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 29 matching lines...) Expand all Loading... |
40 * The newest document in this window. | 40 * The newest document in this window. |
41 * | 41 * |
42 * ## Other resources | 42 * ## Other resources |
43 * | 43 * |
44 * * [Loading web | 44 * * [Loading web |
45 * pages](https://html.spec.whatwg.org/multipage/browsers.html) | 45 * pages](https://html.spec.whatwg.org/multipage/browsers.html) |
46 * from WHATWG. | 46 * from WHATWG. |
47 */ | 47 */ |
48 Document get document => JS('Document', '#.document', this); | 48 Document get document => JS('Document', '#.document', this); |
49 | 49 |
50 WindowBase _open2(url, name) => JS('Window', '#.open(#,#)', this, url, name); | 50 WindowBase _open2(url, name) => |
| 51 JS('Window|Null', '#.open(#,#)', this, url, name); |
51 | 52 |
52 WindowBase _open3(url, name, options) => | 53 WindowBase _open3(url, name, options) => |
53 JS('Window', '#.open(#,#,#)', this, url, name, options); | 54 JS('Window|Null', '#.open(#,#,#)', this, url, name, options); |
54 | 55 |
55 /** | 56 /** |
56 * Opens a new window. | 57 * Opens a new window. |
57 * | 58 * |
58 * ## Other resources | 59 * ## Other resources |
59 * | 60 * |
60 * * [Window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window.ope
n) | 61 * * [Window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window.ope
n) |
61 * from MDN. | 62 * from MDN. |
62 * * [Window open](http://docs.webplatform.org/wiki/dom/methods/open) | 63 * * [Window open](http://docs.webplatform.org/wiki/dom/methods/open) |
63 * from WebPlatform.org. | 64 * from WebPlatform.org. |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 | 361 |
361 ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false
}) { | 362 ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false
}) { |
362 return new _ElementEventStreamImpl(e, _eventType, useCapture); | 363 return new _ElementEventStreamImpl(e, _eventType, useCapture); |
363 } | 364 } |
364 | 365 |
365 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e, | 366 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e, |
366 {bool useCapture: false}) { | 367 {bool useCapture: false}) { |
367 return new _ElementListEventStreamImpl(e, _eventType, useCapture); | 368 return new _ElementListEventStreamImpl(e, _eventType, useCapture); |
368 } | 369 } |
369 } | 370 } |
OLD | NEW |