Top-level container for a browser tab or window.
In a web browser, a WindowBase object represents any browser window. This object contains the window's state and its relation to other windows, such as which window opened this window.
Note: This class represents any window, while Window is used to access the properties and content of the current window or tab.
See also
Other resources
- DOM Window from MDN.
- Window from the W3C.
- Implements
Properties
- bool closed
-
read-onlyIndicates whether this window has been closed.
- HistoryBase history
-
read-onlyThe current session history for this window.
- LocationBase location
-
read-onlyThe current location of this window.
- Events on
-
read-only, inheritedThis is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.
- WindowBase opener
-
read-onlyA reference to the window that opened this one.
- WindowBase parent
-
read-onlyA reference to the parent of this window.
- WindowBase top
-
read-onlyA reference to the topmost window in the window hierarchy.
Constructors
Methods
-
addEventListener(
String type, dynamic listener(Event event), [bool useCapture]) → void -
inherited
-
close(
) → void - Closes the window.
-
dispatchEvent(
Event event) → bool -
inherited
-
postMessage(
message, String targetOrigin, [List messagePorts]) → void - Sends a cross-origin message.
-
removeEventListener(
String type, dynamic listener(Event event), [bool useCapture]) → void -
inherited