OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 @DocsEditable() | 7 @DocsEditable() |
8 $if DART2JS | 8 $if DART2JS |
9 $(ANNOTATIONS)@Native("Window,DOMWindow") | 9 $(ANNOTATIONS)@Native("Window,DOMWindow") |
10 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { | 10 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 * lasting storage. This storage cannot be freed without the user's | 210 * lasting storage. This storage cannot be freed without the user's |
211 * permission. Returns a [Future] whose value stores a reference to the | 211 * permission. Returns a [Future] whose value stores a reference to the |
212 * sandboxed file system for use. Because the file system is sandboxed, | 212 * sandboxed file system for use. Because the file system is sandboxed, |
213 * applications cannot access file systems created in other web pages. | 213 * applications cannot access file systems created in other web pages. |
214 */ | 214 */ |
215 Future<FileSystem> requestFileSystem(int size, {bool persistent: false}) { | 215 Future<FileSystem> requestFileSystem(int size, {bool persistent: false}) { |
216 return _requestFileSystem(persistent? 1 : 0, size); | 216 return _requestFileSystem(persistent? 1 : 0, size); |
217 } | 217 } |
218 | 218 |
219 /** | 219 /** |
220 * Converts a point from node coordinates to this window's coordinates. | 220 * convertPointFromNodeToPage and convertPointFromPageToNode are removed. |
221 * | 221 * see http://dev.w3.org/csswg/cssom-view/#geometry |
222 * ## Other resources | |
223 * | |
224 * * [webkitConvertPointFromPageToNode] | |
225 * (https://developer.apple.com/library/safari/documentation/DataManagement/Re
ference/DOMWindowAdditionsReference/DOMWindowAdditions/DOMWindowAdditions.html#/
/apple_ref/javascript/instm/DOMWindow/webkitConvertPointFromNodeToPage) | |
226 * from Safari Development Library. | |
227 */ | |
228 @DomName('Window.convertPointFromNodeToPage') | |
229 @SupportedBrowser(SupportedBrowser.CHROME) | |
230 @SupportedBrowser(SupportedBrowser.SAFARI) | |
231 @Experimental() | |
232 Point convertPointFromNodeToPage(Node node, Point point) { | |
233 var result = _convertPointFromNodeToPage(node, | |
234 new _DomPoint(point.x, point.y)); | |
235 return new Point(result.x, result.y); | |
236 } | |
237 | |
238 /** | |
239 * Converts a point from this window's coordinates to node coordinates. | |
240 * | |
241 * ## Other resources | |
242 * | |
243 * * [webkitConvertPointFromPageToNode] | |
244 * (https://developer.apple.com/library/safari/documentation/DataManagement/Re
ference/DOMWindowAdditionsReference/DOMWindowAdditions/DOMWindowAdditions.html#/
/apple_ref/javascript/instm/DOMWindow/webkitConvertPointFromPageToNode) | |
245 * from Safari Development Library. | |
246 */ | |
247 @DomName('Window.convertPointFromPageToNode') | |
248 @SupportedBrowser(SupportedBrowser.CHROME) | |
249 @SupportedBrowser(SupportedBrowser.SAFARI) | |
250 @Experimental() | |
251 Point convertPointFromPageToNode(Node node, Point point) { | |
252 var result = _convertPointFromPageToNode(node, | |
253 new _DomPoint(point.x, point.y)); | |
254 return new Point(result.x, result.y); | |
255 } | |
256 | |
257 /** | |
258 * Checks whether [convertPointFromNodeToPage] and | |
259 * [convertPointFromPageToNode] are supported on the current platform. | |
260 */ | 222 */ |
261 static bool get supportsPointConversions => _DomPoint.supported; | 223 static bool get supportsPointConversions => _DomPoint.supported; |
262 $!MEMBERS | 224 $!MEMBERS |
263 | 225 |
264 /** | 226 /** |
265 * Static factory designed to expose `beforeunload` events to event | 227 * Static factory designed to expose `beforeunload` events to event |
266 * handlers that are not necessarily instances of [Window]. | 228 * handlers that are not necessarily instances of [Window]. |
267 * | 229 * |
268 * See [EventStreamProvider] for usage information. | 230 * See [EventStreamProvider] for usage information. |
269 */ | 231 */ |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 | 330 |
369 ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false
}) { | 331 ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false
}) { |
370 return new _ElementEventStreamImpl(e, _eventType, useCapture); | 332 return new _ElementEventStreamImpl(e, _eventType, useCapture); |
371 } | 333 } |
372 | 334 |
373 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e, | 335 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e, |
374 {bool useCapture: false}) { | 336 {bool useCapture: false}) { |
375 return new _ElementListEventStreamImpl(e, _eventType, useCapture); | 337 return new _ElementListEventStreamImpl(e, _eventType, useCapture); |
376 } | 338 } |
377 } | 339 } |
OLD | NEW |