WindowBase class abstract
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.
- Implemented types
- Implementers
Constructors
Properties
- closed â bool?
-
Indicates whether this window has been closed.
no setter
- hashCode â int
-
The hash code for this object.
no setterinherited
- history â HistoryBase
-
The current session history for this window.
no setter
- location â LocationBase
-
The current location of this window.
no setter
- on â Events
-
This is an ease-of-use accessor for event streams which should only be
used when an explicit accessor is not available.
no setterinherited
- opener â WindowBase?
-
A reference to the window that opened this one.
no setter
- parent â WindowBase?
-
A reference to the parent of this window.
no setter
- runtimeType â Type
-
A representation of the runtime type of the object.
no setterinherited
- top â WindowBase?
-
A reference to the topmost window in the window hierarchy.
no setter
Methods
-
addEventListener(
String type, EventListener? listener, [bool? useCapture]) â void -
inherited
-
close(
) â void - Closes the window.
-
dispatchEvent(
Event event) â bool -
inherited
-
noSuchMethod(
Invocation invocation) â dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postMessage(
dynamic message, String targetOrigin, [List< MessagePort> ? messagePorts]) â void - Sends a cross-origin message.
-
removeEventListener(
String type, EventListener? listener, [bool? useCapture]) â void -
inherited
-
toString(
) â String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) â bool -
The equality operator.
inherited