Window class

Inheritance
Implemented types
Mixed-in types

Constructors

Window.internal({required WindowController internalWindowController, required String href, int outerWidth = 0, int outerHeight = 0})
An internal constructor that's NOT part of "dart:html".

Properties

animationFrame Future<num>
Returns a Future that completes just before the window is about to repaint so the user can draw an animation frame.
no setter
animationWorklet Worklet?
no setter
applicationCache ApplicationCache?
The application cache for this window.
latefinal
audioWorklet Worklet?
no setter
caches CacheStorage?
latefinal
closed bool?
Indicates whether this window has been closed.
no setteroverride
console Console
The debugging console for this window.
latefinal
cookieStore CookieStore?
latefinal
crypto Crypto?
Entrypoint for the browser's cryptographic functions.
no setter
customElements CustomElementRegistry?
no setter
defaultStatus String?
Deprecated.
getter/setter pair
defaultstatus String?
Deprecated.
getter/setter pair
devicePixelRatio num
The ratio between physical pixels and logical CSS pixels.
no setter
document Document
The newest document in this window.
latefinal
hashCode int
The hash code for this object.
no setterinherited
history History
The current session history for this window's newest document.
latefinal
indexedDB IdbFactory?
Gets an instance of the Indexed DB factory to being using Indexed DB.
no setter
innerHeight int?
The height of the viewport including scrollbars.
no setter
innerWidth int?
The width of the viewport including scrollbars.
no setter
internalSelection Selection?
getter/setter pair
internalWindowController WindowController
final
isSecureContext bool?
no setter
localStorage Storage
Storage for this window that persists across sessions.
latefinal
location Location
The current location of this window.
getter/setter pairoverride-getter
locationbar BarProp?
This window's location bar, which displays the URL.
no setter
This window's menu bar, which displays menu commands.
no setter
name String?
The name of this window.
getter/setter pair
The user agent accessing this window.
latefinal
offscreenBuffering bool?
Whether objects are drawn offscreen before being displayed.
no setter
on Events
no setterinherited
onAbort Stream<Event>
Stream of abort events handled by this Window.
no setter
onAnimationEnd Stream<AnimationEvent>
Stream of animationend events handled by this Window.
no setter
onAnimationIteration Stream<AnimationEvent>
Stream of animationiteration events handled by this Window.
no setter
onAnimationStart Stream<AnimationEvent>
Stream of animationstart events handled by this Window.
no setter
onBeforeUnload Stream<Event>
Stream of beforeunload events handled by this Window.
no setter
onBlur Stream<Event>
Stream of blur events handled by this Window.
no setter
onCanPlay Stream<Event>
no setter
onCanPlayThrough Stream<Event>
no setter
onChange Stream<Event>
Stream of change events handled by this Window.
no setter
onClick Stream<MouseEvent>
Stream of click events handled by this Window.
no setter
onContentLoaded Stream<Event>
Stream of contentloaded events handled by this Window.
no setter
onContextMenu Stream<MouseEvent>
Stream of contextmenu events handled by this Window.
no setter
onDeviceMotion Stream<DeviceMotionEvent>
Stream of devicemotion events handled by this Window.
no setter
onDeviceOrientation Stream<DeviceOrientationEvent>
Stream of deviceorientation events handled by this Window.
no setter
onDoubleClick Stream<Event>
Stream of doubleclick events handled by this Window.
no setter
onDrag Stream<MouseEvent>
Stream of drag events handled by this Window.
no setter
onDragEnd Stream<MouseEvent>
Stream of dragend events handled by this Window.
no setter
onDragEnter Stream<MouseEvent>
Stream of dragenter events handled by this Window.
no setter
onDragLeave Stream<MouseEvent>
Stream of dragleave events handled by this Window.
no setter
onDragOver Stream<MouseEvent>
Stream of dragover events handled by this Window.
no setter
onDragStart Stream<MouseEvent>
Stream of dragstart events handled by this Window.
no setter
onDrop Stream<MouseEvent>
Stream of drop events handled by this Window.
no setter
onDurationChange Stream<Event>
no setter
onEmptied Stream<Event>
no setter
onEnded Stream<Event>
no setter
onError Stream<Event>
Stream of error events handled by this Window.
no setter
onFocus Stream<Event>
Stream of focus events handled by this Window.
no setter
onHashChange Stream<Event>
Stream of hashchange events handled by this Window.
no setteroverride
onInput Stream<Event>
Stream of input events handled by this Window.
no setter
onInvalid Stream<Event>
Stream of invalid events handled by this Window.
no setter
onKeyDown Stream<KeyboardEvent>
Stream of keydown events handled by this Window.
no setter
onKeyPress Stream<KeyboardEvent>
Stream of keypress events handled by this Window.
no setter
onKeyUp Stream<KeyboardEvent>
Stream of keyup events handled by this Window.
no setter
onLoad Stream<Event>
Stream of load events handled by this Window.
no setter
onLoadedData Stream<Event>
no setter
onLoadedMetadata Stream<Event>
no setter
onLoadStart Stream<Event>
no setter
onMessage Stream<MessageEvent>
Stream of message events handled by this Window.
no setteroverride
onMouseDown Stream<MouseEvent>
Stream of mousedown events handled by this Window.
no setter
onMouseEnter Stream<MouseEvent>
Stream of mouseenter events handled by this Window.
no setter
onMouseLeave Stream<MouseEvent>
Stream of mouseleave events handled by this Window.
no setter
onMouseMove Stream<MouseEvent>
Stream of mousemove events handled by this Window.
no setter
onMouseOut Stream<MouseEvent>
Stream of mouseout events handled by this Window.
no setter
onMouseOver Stream<MouseEvent>
Stream of mouseover events handled by this Window.
no setter
onMouseUp Stream<MouseEvent>
Stream of mouseup events handled by this Window.
no setter
onMouseWheel Stream<WheelEvent>
Stream of mousewheel events handled by this Window.
no setter
onOffline Stream<Event>
Stream of offline events handled by this Window.
no setteroverride
onOnline Stream<Event>
Stream of online events handled by this Window.
no setteroverride
onPageHide Stream<Event>
Stream of pagehide events handled by this Window.
no setter
onPageShow Stream<Event>
Stream of pageshow events handled by this Window.
no setter
onPause Stream<Event>
no setter
onPlay Stream<Event>
no setter
onPlaying Stream<Event>
no setter
onPopState Stream<PopStateEvent>
Stream of popstate events handled by this Window.
no setteroverride
onProgress Stream<Event>
no setter
onRateChange Stream<Event>
no setter
onReset Stream<Event>
Stream of reset events handled by this Window.
no setter
onResize Stream<Event>
Stream of resize events handled by this Window.
no setter
onScroll Stream<Event>
Stream of scroll events handled by this Window.
no setter
onSearch Stream<Event>
Stream of search events handled by this Window.
no setter
onSeeked Stream<Event>
no setter
onSeeking Stream<Event>
no setter
onSelect Stream<Event>
Stream of select events handled by this Window.
no setter
onStalled Stream<Event>
no setter
onStorage Stream<StorageEvent>
Stream of storage events handled by this Window.
no setteroverride
onSubmit Stream<Event>
Stream of submit events handled by this Window.
no setter
onSuspend Stream<Event>
no setter
onTimeUpdate Stream<Event>
no setter
onTouchCancel Stream<TouchEvent>
Stream of touchcancel events handled by this Window.
no setter
onTouchEnd Stream<TouchEvent>
Stream of touchend events handled by this Window.
no setter
onTouchMove Stream<TouchEvent>
Stream of touchmove events handled by this Window.
no setter
onTouchStart Stream<TouchEvent>
Stream of touchstart events handled by this Window.
no setter
onTransitionEnd Stream<TransitionEvent>
Stream of transitionend events handled by this Window.
no setter
onUnload Stream<Event>
Stream of unload events handled by this Window.
no setteroverride
onVolumeChange Stream<Event>
no setter
onWaiting Stream<Event>
no setter
onWheel Stream<WheelEvent>
Stream of wheel events handled by this Window.
no setter
opener WindowBase?
A reference to the window that opened this one.
getter/setter pairoverride-getter
orientation int?
no setter
origin String?
no setter
outerHeight int
The height of this window including all user interface elements.
final
outerWidth int
The width of the window including all user interface elements.
final
pageXOffset int
no setter
pageYOffset int
no setter
parent WindowBase?
A reference to the parent of this window.
no setteroverride
performance Performance
Timing and navigation data for this window.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screen Screen?
Information about the screen displaying this window.
latefinal
screenLeft int?
The distance from the left side of the screen to the left side of this window.
no setter
screenTop int?
The distance from the top of the screen to the top of this window.
no setter
screenX int?
The distance from the left side of the screen to the mouse pointer.
no setter
screenY int?
The distance from the top of the screen to the mouse pointer.
no setter
scrollbars BarProp?
This window's scroll bars.
no setter
scrollX int
The distance this window has been scrolled horizontally.
no setter
scrollY int
The distance this window has been scrolled vertically.
no setter
self WindowBase?
The current window.
no setter
sessionStorage Storage
Storage for this window that is cleared when this session ends.
latefinal
speechSynthesis SpeechSynthesis?
Access to speech synthesis in the browser.
no setter
status String?
Deprecated.
getter/setter pair
statusbar BarProp?
This window's status bar.
no setter
styleMedia StyleMedia?
Access to CSS media queries.
no setter
toolbar BarProp?
This window's tool bar.
no setter
top WindowBase?
A reference to the topmost window in the window hierarchy.
no setteroverride
visualViewport VisualViewport?
no setter
window WindowBase?
The current window.
no setter

Methods

addEventListener(String type, EventListener listener, [bool? useCapture]) → void
inherited
alert([String? message]) → void
Displays a modal alert to the user.
atob(String atob) String
blur() → void
Removes focus from the browser window.
btoa(String btoa) String
cancelIdleCallback(int handle) → void
close() → void
Closes the window.
override
confirm([String? message]) bool
Displays a modal OK/Cancel prompt to the user.
dispatchEvent(Event event) bool
inherited
fetch(dynamic input, [Map? init]) Future
find(String? string, bool? caseSensitive, bool? backwards, bool? wrap, bool? wholeWord, bool? searchInFrames, bool? showDialog) bool
Finds text in this window.
focus() → void
Brings the browser window to the foreground.
getComputedStyleMap(Element element, String? pseudoElement) StylePropertyMapReadonly
getMatchedCssRules(Element? element, String? pseudoElement) List<CssRule>
Returns all CSS rules that apply to the element's pseudo-element.
getSelection() Selection?
Returns the currently selected text.
matchMedia(String query) MediaQueryList
Returns a list of media queries for the given query string.
moveBy(int x, int y) → void
Moves this window.
moveTo(Point<num> p) → void
Moves this window to a specific position.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(String url, String name, [String? options]) WindowBase
Opens a new window.
postMessage(dynamic message, String targetOrigin, [List<Object>? messagePorts]) → void
Sends a cross-origin message.
override
print() → void
Opens the print dialog for this window.
removeEventListener(String type, EventListener listener, [bool? useCapture]) → void
inherited
requestAnimationFrame(FrameRequestCallback callback) int
Called to draw an animation frame and then request the window to repaint after callback has finished (creating the animation).
requestFileSystem(int size, {bool persistent = false}) Future<FileSystem>
Access a sandboxed file system of size bytes.
requestIdleCallback(IdleRequestCallback callback, [Map? options]) int
resizeBy(int x, int y) → void
Resizes this window by an offset.
resizeTo(int x, int y) → void
Resizes this window to a specific width and height.
resolveLocalFileSystemUrl(String url) Future<Entry>
Asynchronously retrieves a local filesystem entry.
scroll([dynamic optionsOrX, dynamic y, Map? scrollOptions]) → void
Scrolls the page horizontally and vertically to a specific point.
scrollBy([dynamic optionsOrX, dynamic y, Map? scrollOptions]) → void
Scrolls the page horizontally and vertically by an offset.
scrollTo([dynamic optionsOrX, dynamic y, Map? scrollOptions]) → void
Scrolls the page horizontally and vertically to a specific point.
stop() → void
Stops the window from loading.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

supportsPointConversions bool
convertPointFromNodeToPage and convertPointFromPageToNode are removed. see http://dev.w3.org/csswg/cssom-view/#geometry
no setter

Constants

animationEndEvent → const EventStreamProvider<AnimationEvent>
Static factory designed to expose animationend events to event handlers that are not necessarily instances of Window.
animationIterationEvent → const EventStreamProvider<AnimationEvent>
Static factory designed to expose animationiteration events to event handlers that are not necessarily instances of Window.
animationStartEvent → const EventStreamProvider<AnimationEvent>
Static factory designed to expose animationstart events to event handlers that are not necessarily instances of Window.
beforeUnloadEvent → const EventStreamProvider<BeforeUnloadEvent>
Static factory designed to expose beforeunload events to event handlers that are not necessarily instances of Window.
contentLoadedEvent → const EventStreamProvider<Event>
Static factory designed to expose contentloaded events to event handlers that are not necessarily instances of Window.
deviceMotionEvent → const EventStreamProvider<DeviceMotionEvent>
Static factory designed to expose devicemotion events to event handlers that are not necessarily instances of Window.
deviceOrientationEvent → const EventStreamProvider<DeviceOrientationEvent>
Static factory designed to expose deviceorientation events to event handlers that are not necessarily instances of Window.
hashChangeEvent → const EventStreamProvider<Event>
Static factory designed to expose hashchange events to event handlers that are not necessarily instances of Window.
loadStartEvent → const EventStreamProvider<Event>
messageEvent → const EventStreamProvider<MessageEvent>
Static factory designed to expose message events to event handlers that are not necessarily instances of Window.
offlineEvent → const EventStreamProvider<Event>
Static factory designed to expose offline events to event handlers that are not necessarily instances of Window.
onlineEvent → const EventStreamProvider<Event>
Static factory designed to expose online events to event handlers that are not necessarily instances of Window.
pageHideEvent → const EventStreamProvider<Event>
Static factory designed to expose pagehide events to event handlers that are not necessarily instances of Window.
pageShowEvent → const EventStreamProvider<Event>
Static factory designed to expose pageshow events to event handlers that are not necessarily instances of Window.
PERSISTENT → const int
Indicates that file system data cannot be cleared unless given user permission.
popStateEvent → const EventStreamProvider<PopStateEvent>
Static factory designed to expose popstate events to event handlers that are not necessarily instances of Window.
progressEvent → const EventStreamProvider<Event>
storageEvent → const EventStreamProvider<StorageEvent>
Static factory designed to expose storage events to event handlers that are not necessarily instances of Window.
TEMPORARY → const int
Indicates that file system data can be cleared at any time.
unloadEvent → const EventStreamProvider<Event>
Static factory designed to expose unload events to event handlers that are not necessarily instances of Window.