| 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 html; | 5 part of html; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * An object representing the top-level context object for web scripting. | 8 * An object representing the top-level context object for web scripting. |
| 9 * | 9 * |
| 10 * In a web browser, a [Window] object represents the actual browser window. | 10 * In a web browser, a [Window] object represents the actual browser window. |
| 11 * In a multi-tabbed browser, each tab has its own [Window] object. A [Window] | 11 * In a multi-tabbed browser, each tab has its own [Window] object. A [Window] |
| 12 * is the container that displays a [Document]'s content. All web scripting | 12 * is the container that displays a [Document]'s content. All web scripting |
| 13 * happens within the context of a [Window] object. | 13 * happens within the context of a [Window] object. |
| 14 * | 14 * |
| 15 * **Note:** This class represents any window, whereas [Window] is | 15 * **Note:** This class represents any window, whereas [Window] is |
| 16 * used to access the properties and content of the current window. | 16 * used to access the properties and content of the current window. |
| 17 * | 17 * |
| 18 * See also: | 18 * See also: |
| 19 * | 19 * |
| 20 * * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN. | 20 * * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN. |
| 21 * * [Window](http://www.w3.org/TR/Window/) from the W3C. | 21 * * [Window](http://www.w3.org/TR/Window/) from the W3C. |
| 22 */ | 22 */ |
| 23 abstract class WindowBase { | 23 abstract class WindowBase implements EventTarget { |
| 24 // Fields. | 24 // Fields. |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * The current location of this window. | 27 * The current location of this window. |
| 28 * | 28 * |
| 29 * Location currentLocation = window.location; | 29 * Location currentLocation = window.location; |
| 30 * print(currentLocation.href); // 'http://www.example.com:80/' | 30 * print(currentLocation.href); // 'http://www.example.com:80/' |
| 31 */ | 31 */ |
| 32 LocationBase get location; | 32 LocationBase get location; |
| 33 HistoryBase get history; | 33 HistoryBase get history; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 abstract class LocationBase { | 121 abstract class LocationBase { |
| 122 void set href(String val); | 122 void set href(String val); |
| 123 } | 123 } |
| 124 | 124 |
| 125 abstract class HistoryBase { | 125 abstract class HistoryBase { |
| 126 void back(); | 126 void back(); |
| 127 void forward(); | 127 void forward(); |
| 128 void go(int distance); | 128 void go(int distance); |
| 129 } | 129 } |
| OLD | NEW |