Window interface
The Window interface represents a window containing a DOM document; the document property points to the DOM document loaded in that window.
- Extends
-
EventTarget,AnimationFrameProvider,GlobalEventHandlers,WindowEventHandlers,WindowLocalStorage,WindowOrWorkerGlobalScope,WindowSessionStorage
Properties
| client |
|
| closed | The |
| cookie |
The |
| custom |
The |
| device |
The |
| document |
|
| event | The read-only Window property |
| external | The |
| frame |
The |
| frames | Returns the window itself, which is an array-like object, listing the direct sub-frames of the current window. |
| history | The |
| inner |
The read-only |
| inner |
The read-only Window property |
| length | Returns the number of frames (either frame or A number. |
| location | The |
| locationbar | Returns the |
| menubar | Returns the |
| ms |
|
| name | The |
| navigator | The |
| ondevicemotion | Available only in secure contexts. |
| ondeviceorientation | Available only in secure contexts. |
| ondeviceorientationabsolute | Available only in secure contexts. |
| onorientationchange | |
| opener | The Window interface's |
| orientation | Returns the orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation. |
| origin |
The |
| outer |
The |
| outer |
|
| page |
|
| page |
|
| parent | The |
| personalbar | Returns the |
| powerbi | |
| power |
|
| screen | The Window property |
| screen |
The |
| screen |
The |
| screenX | The |
| screenY | The |
| scrollbars | Returns the |
| scrollX | The read-only |
| scrollY | The read-only |
| self | The |
| speech |
The |
| status | The |
| statusbar | Returns the |
| toolbar | Returns the |
| top | Returns a reference to the topmost window in the window hierarchy. |
| visual |
The |
| window | The |
Inherited Properties
Methods
| add |
|
| add |
The |
| alert(any) |
|
| blur() | The |
| cancel |
The |
| capture |
The |
| close() | The |
| confirm(string) |
|
| focus() | Makes a request to bring the window to the front. |
| get |
The |
| get |
The |
| match |
The Window interface's |
| move |
The |
| move |
The |
| open(string | URL, string, string) | The |
| post |
The |
| post |
|
| print() | Opens the print dialog to print the current document. |
| prompt(string, string) |
|
| release |
Releases the window from trapping events of a specific type. |
| remove |
|
| remove |
The |
| request |
The |
| resize |
The |
| resize |
The |
| scroll(number, number) | |
| scroll(Scroll |
The |
| scroll |
|
| scroll |
The |
| scroll |
|
| scroll |
|
| stop() | The |
Inherited Methods
| atob(string) | |
| btoa(string) | |
| cancel |
|
| clear |
|
| clear |
|
| create |
|
| create |
|
| dispatch |
The |
| fetch(URL | Request |
|
| queue |
|
| report |
|
| request |
|
| set |
|
| set |
|
| structured |
Property Details
clientInformation
clientInformation: Navigator
Property Value
Navigator
closed
The Window.closed read-only property indicates whether the referenced window is closed or not.
closed: boolean
Property Value
boolean
cookieStore
The cookieStore read-only property of the Window interface returns a reference to the CookieStore object for the current document context.
cookieStore: CookieStore
Property Value
CookieStore
customElements
The customElements read-only property of the Window interface returns a reference to the CustomElementRegistry object, which can be used to register new custom elements and get information about previously registered custom elements.
customElements: CustomElementRegistry
Property Value
CustomElementRegistry
devicePixelRatio
The devicePixelRatio of Window interface returns the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.
devicePixelRatio: number
Property Value
number
document
window.document returns a reference to the document contained in the window.
document: Document
Property Value
event
The read-only Window property event returns the Event which is currently being handled by the site's code.
event: Event | undefined
Property Value
Event | undefined
external
The external property of the Window API returns an instance of the External interface, which was intended to contain functions related to adding external search providers to the browser.
external: External
Property Value
External
frameElement
The Window.frameElement property returns the element (such as iframe or object) in which the window is embedded.
frameElement: Element | null
Property Value
Element | null
frames
Returns the window itself, which is an array-like object, listing the direct sub-frames of the current window.
frames: Window
Property Value
history
The Window.history read-only property returns a reference to the History object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in).
history: History
Property Value
History
innerHeight
The read-only innerHeight property of the including the height of the horizontal scroll bar, if present.
innerHeight: number
Property Value
number
innerWidth
The read-only Window property innerWidth returns the interior width of the window in pixels (that is, the width of the window's layout viewport).
innerWidth: number
Property Value
number
length
Returns the number of frames (either frame or A number.
length: number
Property Value
number
location
The Window.location read-only property returns a Location object with information about the current location of the document.
Location location
Property Value
Location
locationbar
menubar
msCrypto
msCrypto: Crypto
Property Value
Crypto
name
The Window.name property gets/sets the name of the window's browsing context.
name: string
Property Value
string
navigator
The Window.navigator read-only property returns a reference to the Navigator object, which has methods and properties about the application running the script.
navigator: Navigator
Property Value
Navigator
ondevicemotion
Available only in secure contexts.
ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any | null
Property Value
(this: Window, ev: DeviceMotionEvent) => any | null
ondeviceorientation
Available only in secure contexts.
ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any | null
Property Value
(this: Window, ev: DeviceOrientationEvent) => any | null
ondeviceorientationabsolute
Available only in secure contexts.
ondeviceorientationabsolute: (this: Window, ev: DeviceOrientationEvent) => any | null
Property Value
(this: Window, ev: DeviceOrientationEvent) => any | null
onorientationchange
onorientationchange: (this: Window, ev: Event) => any | null
Property Value
(this: Window, ev: Event) => any | null
opener
The Window interface's opener property returns a reference to the window that opened the window, either with Window.open, or by navigating a link with a target attribute.
opener: any
Property Value
any
orientation
Returns the orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation.
orientation: number
Property Value
number
originAgentCluster
The originAgentCluster read-only property of the Window interface returns true if this window belongs to an origin-keyed agent cluster: this means that the operating system has provided dedicated resources (for example an operating system process) to this window's origin that are not shared with windows from other origins.
originAgentCluster: boolean
Property Value
boolean
outerHeight
The Window.outerHeight read-only property returns the height in pixels of the whole browser window, including any sidebar, window chrome, and window-resizing borders/handles.
outerHeight: number
Property Value
number
outerWidth
Window.outerWidth read-only property returns the width of the outside of the browser window.
outerWidth: number
Property Value
number
pageXOffset
pageYOffset
parent
The Window.parent property is a reference to the parent of the current window or subframe.
parent: Window
Property Value
personalbar
powerbi
powerBISDKGlobalServiceInstanceName
powerBISDKGlobalServiceInstanceName?: string
Property Value
string
screen
The Window property screen returns a reference to the screen object associated with the window.
screen: Screen
Property Value
Screen
screenLeft
The Window.screenLeft read-only property returns the horizontal distance, in CSS pixels, from the left border of the user's browser viewport to the left side of the screen.
screenLeft: number
Property Value
number
screenTop
The Window.screenTop read-only property returns the vertical distance, in CSS pixels, from the top border of the user's browser viewport to the top side of the screen.
screenTop: number
Property Value
number
screenX
The Window.screenX read-only property returns the horizontal distance, in CSS pixels, of the left border of the user's browser viewport to the left side of the screen.
screenX: number
Property Value
number
screenY
The Window.screenY read-only property returns the vertical distance, in CSS pixels, of the top border of the user's browser viewport to the top edge of the screen.
screenY: number
Property Value
number
scrollbars
scrollX
The read-only scrollX property of the Window interface returns the number of pixels by which the document is currently scrolled horizontally.
scrollX: number
Property Value
number
scrollY
The read-only scrollY property of the Window interface returns the number of pixels by which the document is currently scrolled vertically.
scrollY: number
Property Value
number
self
The Window.self read-only property returns the window itself, as a WindowProxy.
self: Window & typeof globalThis
Property Value
Window & typeof globalThis
speechSynthesis
The speechSynthesis read-only property of the Window object returns a SpeechSynthesis object, which is the entry point into using Web Speech API speech synthesis functionality.
speechSynthesis: SpeechSynthesis
Property Value
SpeechSynthesis
status
The status property of the bar at the bottom of the browser window.
status: string
Property Value
string
statusbar
toolbar
top
Returns a reference to the topmost window in the window hierarchy.
top: Window | null
Property Value
Window | null
visualViewport
The visualViewport read-only property of the Window interface returns a VisualViewport object representing the visual viewport for a given window, or null if current document is not fully active.
visualViewport: VisualViewport | null
Property Value
VisualViewport | null
window
The window property of a Window object points to the window object itself.
window: Window & typeof globalThis
Property Value
Window & typeof globalThis
Inherited Property Details
caches
Available only in secure contexts.
caches: CacheStorage
Property Value
CacheStorage
Inherited From WindowOrWorkerGlobalScope.caches
crossOriginIsolated
crossOriginIsolated: boolean
Property Value
boolean
Inherited From WindowOrWorkerGlobalScope.crossOriginIsolated
crypto
indexedDB
indexedDB: IDBFactory
Property Value
IDBFactory
Inherited From WindowOrWorkerGlobalScope.indexedDB
isSecureContext
isSecureContext: boolean
Property Value
boolean
Inherited From WindowOrWorkerGlobalScope.isSecureContext
localStorage
localStorage: Storage
Property Value
Storage
Inherited From WindowLocalStorage.localStorage
onabort
onabort: (this: GlobalEventHandlers, ev: UIEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: UIEvent) => any | null
Inherited From GlobalEventHandlers.onabort
onafterprint
onafterprint: (this: WindowEventHandlers, ev: Event) => any | null
Property Value
(this: WindowEventHandlers, ev: Event) => any | null
Inherited From WindowEventHandlers.onafterprint
onanimationcancel
onanimationcancel: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: AnimationEvent) => any | null
Inherited From GlobalEventHandlers.onanimationcancel
onanimationend
onanimationend: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: AnimationEvent) => any | null
Inherited From GlobalEventHandlers.onanimationend
onanimationiteration
onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: AnimationEvent) => any | null
Inherited From GlobalEventHandlers.onanimationiteration
onanimationstart
onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: AnimationEvent) => any | null
Inherited From GlobalEventHandlers.onanimationstart
onauxclick
onauxclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onauxclick
onbeforeinput
onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: InputEvent) => any | null
Inherited From GlobalEventHandlers.onbeforeinput
onbeforematch
onbeforematch: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onbeforematch
onbeforeprint
onbeforeprint: (this: WindowEventHandlers, ev: Event) => any | null
Property Value
(this: WindowEventHandlers, ev: Event) => any | null
Inherited From WindowEventHandlers.onbeforeprint
onbeforetoggle
onbeforetoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: ToggleEvent) => any | null
Inherited From GlobalEventHandlers.onbeforetoggle
onbeforeunload
onbeforeunload: (this: WindowEventHandlers, ev: BeforeUnloadEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: BeforeUnloadEvent) => any | null
Inherited From WindowEventHandlers.onbeforeunload
onblur
onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: FocusEvent) => any | null
Inherited From GlobalEventHandlers.onblur
oncancel
oncancel: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.oncancel
oncanplay
oncanplay: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.oncanplay
oncanplaythrough
oncanplaythrough: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.oncanplaythrough
onchange
onchange: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onchange
onclick
onclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onclick
onclose
onclose: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onclose
oncontextlost
oncontextlost: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.oncontextlost
oncontextmenu
oncontextmenu: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.oncontextmenu
oncontextrestored
oncontextrestored: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.oncontextrestored
oncopy
oncopy: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
Inherited From GlobalEventHandlers.oncopy
oncuechange
oncuechange: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.oncuechange
oncut
oncut: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
Inherited From GlobalEventHandlers.oncut
ondblclick
ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
Inherited From GlobalEventHandlers.ondblclick
ondrag
ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: DragEvent) => any | null
Inherited From GlobalEventHandlers.ondrag
ondragend
ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: DragEvent) => any | null
Inherited From GlobalEventHandlers.ondragend
ondragenter
ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: DragEvent) => any | null
Inherited From GlobalEventHandlers.ondragenter
ondragleave
ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: DragEvent) => any | null
Inherited From GlobalEventHandlers.ondragleave
ondragover
ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: DragEvent) => any | null
Inherited From GlobalEventHandlers.ondragover
ondragstart
ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: DragEvent) => any | null
Inherited From GlobalEventHandlers.ondragstart
ondrop
ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: DragEvent) => any | null
Inherited From GlobalEventHandlers.ondrop
ondurationchange
ondurationchange: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.ondurationchange
onemptied
onemptied: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onemptied
onended
onended: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onended
onerror
onerror: OnErrorEventHandler
Property Value
OnErrorEventHandler
Inherited From GlobalEventHandlers.onerror
onfocus
onfocus: (this: GlobalEventHandlers, ev: FocusEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: FocusEvent) => any | null
Inherited From GlobalEventHandlers.onfocus
onformdata
onformdata: (this: GlobalEventHandlers, ev: FormDataEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: FormDataEvent) => any | null
Inherited From GlobalEventHandlers.onformdata
ongamepadconnected
ongamepadconnected: (this: WindowEventHandlers, ev: GamepadEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: GamepadEvent) => any | null
Inherited From WindowEventHandlers.ongamepadconnected
ongamepaddisconnected
ongamepaddisconnected: (this: WindowEventHandlers, ev: GamepadEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: GamepadEvent) => any | null
Inherited From WindowEventHandlers.ongamepaddisconnected
ongotpointercapture
ongotpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.ongotpointercapture
onhashchange
onhashchange: (this: WindowEventHandlers, ev: HashChangeEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: HashChangeEvent) => any | null
Inherited From WindowEventHandlers.onhashchange
oninput
oninput: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.oninput
oninvalid
oninvalid: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.oninvalid
onkeydown
onkeydown: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
Inherited From GlobalEventHandlers.onkeydown
onkeypress
onkeypress: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
Inherited From GlobalEventHandlers.onkeypress
onkeyup
onkeyup: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
Inherited From GlobalEventHandlers.onkeyup
onlanguagechange
onlanguagechange: (this: WindowEventHandlers, ev: Event) => any | null
Property Value
(this: WindowEventHandlers, ev: Event) => any | null
Inherited From WindowEventHandlers.onlanguagechange
onload
onload: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onload
onloadeddata
onloadeddata: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onloadeddata
onloadedmetadata
onloadedmetadata: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onloadedmetadata
onloadstart
onloadstart: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onloadstart
onlostpointercapture
onlostpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onlostpointercapture
onmessage
onmessage: (this: WindowEventHandlers, ev: MessageEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: MessageEvent) => any | null
Inherited From WindowEventHandlers.onmessage
onmessageerror
onmessageerror: (this: WindowEventHandlers, ev: MessageEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: MessageEvent) => any | null
Inherited From WindowEventHandlers.onmessageerror
onmousedown
onmousedown: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
Inherited From GlobalEventHandlers.onmousedown
onmouseenter
onmouseenter: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
Inherited From GlobalEventHandlers.onmouseenter
onmouseleave
onmouseleave: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
Inherited From GlobalEventHandlers.onmouseleave
onmousemove
onmousemove: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
Inherited From GlobalEventHandlers.onmousemove
onmouseout
onmouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
Inherited From GlobalEventHandlers.onmouseout
onmouseover
onmouseover: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
Inherited From GlobalEventHandlers.onmouseover
onmouseup
onmouseup: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
Inherited From GlobalEventHandlers.onmouseup
onoffline
onoffline: (this: WindowEventHandlers, ev: Event) => any | null
Property Value
(this: WindowEventHandlers, ev: Event) => any | null
Inherited From WindowEventHandlers.onoffline
ononline
ononline: (this: WindowEventHandlers, ev: Event) => any | null
Property Value
(this: WindowEventHandlers, ev: Event) => any | null
Inherited From WindowEventHandlers.ononline
onpagehide
onpagehide: (this: WindowEventHandlers, ev: PageTransitionEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: PageTransitionEvent) => any | null
Inherited From WindowEventHandlers.onpagehide
onpagereveal
onpagereveal: (this: WindowEventHandlers, ev: PageRevealEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: PageRevealEvent) => any | null
Inherited From WindowEventHandlers.onpagereveal
onpageshow
onpageshow: (this: WindowEventHandlers, ev: PageTransitionEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: PageTransitionEvent) => any | null
Inherited From WindowEventHandlers.onpageshow
onpageswap
onpageswap: (this: WindowEventHandlers, ev: PageSwapEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: PageSwapEvent) => any | null
Inherited From WindowEventHandlers.onpageswap
onpaste
onpaste: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
Inherited From GlobalEventHandlers.onpaste
onpause
onpause: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onpause
onplay
onplay: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onplay
onplaying
onplaying: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onplaying
onpointercancel
onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onpointercancel
onpointerdown
onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onpointerdown
onpointerenter
onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onpointerenter
onpointerleave
onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onpointerleave
onpointermove
onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onpointermove
onpointerout
onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onpointerout
onpointerover
onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onpointerover
onpointerrawupdate
Available only in secure contexts.
onpointerrawupdate: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onpointerrawupdate
onpointerup
onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
Inherited From GlobalEventHandlers.onpointerup
onpopstate
onpopstate: (this: WindowEventHandlers, ev: PopStateEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: PopStateEvent) => any | null
Inherited From WindowEventHandlers.onpopstate
onprogress
onprogress: (this: GlobalEventHandlers, ev: ProgressEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: ProgressEvent) => any | null
Inherited From GlobalEventHandlers.onprogress
onratechange
onratechange: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onratechange
onrejectionhandled
onrejectionhandled: (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null
Inherited From WindowEventHandlers.onrejectionhandled
onreset
onreset: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onreset
onresize
onresize: (this: GlobalEventHandlers, ev: UIEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: UIEvent) => any | null
Inherited From GlobalEventHandlers.onresize
onscroll
onscroll: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onscroll
onscrollend
onscrollend: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onscrollend
onsecuritypolicyviolation
onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null
Inherited From GlobalEventHandlers.onsecuritypolicyviolation
onseeked
onseeked: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onseeked
onseeking
onseeking: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onseeking
onselect
onselect: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onselect
onselectionchange
onselectionchange: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onselectionchange
onselectstart
onselectstart: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onselectstart
onslotchange
onslotchange: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onslotchange
onstalled
onstalled: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onstalled
onstorage
onstorage: (this: WindowEventHandlers, ev: StorageEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: StorageEvent) => any | null
Inherited From WindowEventHandlers.onstorage
onsubmit
onsubmit: (this: GlobalEventHandlers, ev: SubmitEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: SubmitEvent) => any | null
Inherited From GlobalEventHandlers.onsubmit
onsuspend
onsuspend: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onsuspend
ontimeupdate
ontimeupdate: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.ontimeupdate
ontoggle
ontoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: ToggleEvent) => any | null
Inherited From GlobalEventHandlers.ontoggle
ontouchcancel
ontouchcancel?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: TouchEvent) => any | null
Inherited From GlobalEventHandlers.ontouchcancel
ontouchend
ontouchend?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: TouchEvent) => any | null
Inherited From GlobalEventHandlers.ontouchend
ontouchmove
ontouchmove?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: TouchEvent) => any | null
Inherited From GlobalEventHandlers.ontouchmove
ontouchstart
ontouchstart?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: TouchEvent) => any | null
Inherited From GlobalEventHandlers.ontouchstart
ontransitioncancel
ontransitioncancel: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: TransitionEvent) => any | null
Inherited From GlobalEventHandlers.ontransitioncancel
ontransitionend
ontransitionend: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: TransitionEvent) => any | null
Inherited From GlobalEventHandlers.ontransitionend
ontransitionrun
ontransitionrun: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: TransitionEvent) => any | null
Inherited From GlobalEventHandlers.ontransitionrun
ontransitionstart
ontransitionstart: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: TransitionEvent) => any | null
Inherited From GlobalEventHandlers.ontransitionstart
onunhandledrejection
onunhandledrejection: (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null
Property Value
(this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null
Inherited From WindowEventHandlers.onunhandledrejection
onunload
onunload: (this: WindowEventHandlers, ev: Event) => any | null
Property Value
(this: WindowEventHandlers, ev: Event) => any | null
Inherited From WindowEventHandlers.onunload
onvolumechange
onvolumechange: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onvolumechange
onwaiting
onwaiting: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onwaiting
onwebkitanimationend
onwebkitanimationend: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationiteration: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onwebkitanimationiteration
onwebkitanimationstart
onwebkitanimationstart: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onwebkitanimationstart
onwebkittransitionend
onwebkittransitionend: (this: GlobalEventHandlers, ev: Event) => any | null
Property Value
(this: GlobalEventHandlers, ev: Event) => any | null
Inherited From GlobalEventHandlers.onwebkittransitionend
onwheel
onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any | null
Property Value
(this: GlobalEventHandlers, ev: WheelEvent) => any | null
Inherited From GlobalEventHandlers.onwheel
origin
performance
performance: Performance
Property Value
Performance
Inherited From WindowOrWorkerGlobalScope.performance
sessionStorage
sessionStorage: Storage
Property Value
Storage
Inherited From WindowSessionStorage.sessionStorage
Method Details
addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)
function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions)
Parameters
- type
-
string
- listener
-
EventListenerOrEventListenerObject
- options
-
boolean | AddEventListenerOptions
addEventListener<K>(K, (this: Window, ev: WindowEventMap[K]) => any, boolean | AddEventListenerOptions)
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
function addEventListener<K>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions)
Parameters
- type
-
K
- listener
-
(this: Window, ev: WindowEventMap[K]) => any
- options
-
boolean | AddEventListenerOptions
alert(any)
window.alert() instructs the browser to display a dialog with an optional message, and to wait until the user dismisses the dialog.
function alert(message?: any)
Parameters
- message
-
any
blur()
The Window.blur() method does nothing.
function blur()
cancelIdleCallback(number)
The window.cancelIdleCallback() method cancels a callback previously scheduled with window.requestIdleCallback().
function cancelIdleCallback(handle: number)
Parameters
- handle
-
number
captureEvents()
The Window.captureEvents() method does nothing.
function captureEvents()
close()
The Window.close() method closes the current window, or the window on which it was called.
function close()
confirm(string)
window.confirm() instructs the browser to display a dialog with an optional message, and to wait until the user either confirms or cancels the dialog.
function confirm(message?: string): boolean
Parameters
- message
-
string
Returns
boolean
focus()
getComputedStyle(Element, string | null)
The Window.getComputedStyle() method returns an object containing the values of all CSS properties of an element, after applying active stylesheets and resolving any basic computation those values may contain.
function getComputedStyle(elt: Element, pseudoElt?: string | null): CSSStyleDeclaration
Parameters
- elt
-
Element
- pseudoElt
-
string | null
Returns
CSSStyleDeclaration
getSelection()
The getSelection() method of the Window interface returns the Selection object associated with the window's document, representing the range of text selected by the user or the current position of the caret.
function getSelection(): Selection | null
Returns
Selection | null
matchMedia(string)
The Window interface's matchMedia() method returns a new MediaQueryList object that can then be used to determine if the document matches the media query string, as well as to monitor the document to detect when it matches (or stops matching) that media query.
function matchMedia(query: string): MediaQueryList
Parameters
- query
-
string
Returns
MediaQueryList
moveBy(number, number)
The moveBy() method of the Window interface moves the current window by a specified amount.
function moveBy(x: number, y: number)
Parameters
- x
-
number
- y
-
number
moveTo(number, number)
The moveTo() method of the Window interface moves the current window to the specified coordinates.
function moveTo(x: number, y: number)
Parameters
- x
-
number
- y
-
number
open(string | URL, string, string)
The open() method of the Window interface loads a specified resource into a new or existing browsing context (that is, a tab, a window, or an iframe) under a specified name.
function open(url?: string | URL, target?: string, features?: string): Window | null
Parameters
- url
-
string | URL
- target
-
string
- features
-
string
Returns
Window | null
postMessage(any, string, Transferable[])
The window.postMessage() method safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.
function postMessage(message: any, targetOrigin: string, transfer?: Transferable[])
Parameters
- message
-
any
- targetOrigin
-
string
- transfer
-
Transferable[]
postMessage(any, WindowPostMessageOptions)
function postMessage(message: any, options?: WindowPostMessageOptions)
Parameters
- message
-
any
- options
-
WindowPostMessageOptions
print()
prompt(string, string)
window.prompt() instructs the browser to display a dialog with an optional message prompting the user to input some text, and to wait until the user either submits the text or cancels the dialog.
function prompt(message?: string, _default?: string): string | null
Parameters
- message
-
string
- _default
-
string
Returns
string | null
releaseEvents()
Releases the window from trapping events of a specific type.
function releaseEvents()
removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)
function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions)
Parameters
- type
-
string
- listener
-
EventListenerOrEventListenerObject
- options
-
boolean | EventListenerOptions
removeEventListener<K>(K, (this: Window, ev: WindowEventMap[K]) => any, boolean | EventListenerOptions)
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
function removeEventListener<K>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions)
Parameters
- type
-
K
- listener
-
(this: Window, ev: WindowEventMap[K]) => any
- options
-
boolean | EventListenerOptions
requestIdleCallback(IdleRequestCallback, IdleRequestOptions)
The window.requestIdleCallback() method queues a function to be called during a browser's idle periods.
function requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number
Parameters
- callback
-
IdleRequestCallback
- options
-
IdleRequestOptions
Returns
number
resizeBy(number, number)
The Window.resizeBy() method resizes the current window by a specified amount.
function resizeBy(x: number, y: number)
Parameters
- x
-
number
- y
-
number
resizeTo(number, number)
The Window.resizeTo() method dynamically resizes the window.
function resizeTo(width: number, height: number)
Parameters
- width
-
number
- height
-
number
scroll(number, number)
function scroll(x: number, y: number)
Parameters
- x
-
number
- y
-
number
scroll(ScrollToOptions)
The Window.scroll() method scrolls the window to a particular place in the document.
function scroll(options?: ScrollToOptions)
Parameters
- options
-
ScrollToOptions
scrollBy(number, number)
function scrollBy(x: number, y: number)
Parameters
- x
-
number
- y
-
number
scrollBy(ScrollToOptions)
The Window.scrollBy() method scrolls the document in the window by the given amount.
function scrollBy(options?: ScrollToOptions)
Parameters
- options
-
ScrollToOptions
scrollTo(number, number)
function scrollTo(x: number, y: number)
Parameters
- x
-
number
- y
-
number
scrollTo(ScrollToOptions)
Window.scrollTo() scrolls to a particular set of coordinates in the document.
function scrollTo(options?: ScrollToOptions)
Parameters
- options
-
ScrollToOptions
stop()
The window.stop() stops further resource loading in the current browsing context, equivalent to the stop button in the browser.
function stop()
Inherited Method Details
atob(string)
function atob(data: string): string
Parameters
- data
-
string
Returns
string
Inherited From WindowOrWorkerGlobalScope.atob
btoa(string)
function btoa(data: string): string
Parameters
- data
-
string
Returns
string
Inherited From WindowOrWorkerGlobalScope.btoa
cancelAnimationFrame(number)
function cancelAnimationFrame(handle: number)
Parameters
- handle
-
number
Inherited From AnimationFrameProvider.cancelAnimationFrame
clearInterval(number | undefined)
function clearInterval(id: number | undefined)
Parameters
- id
-
number | undefined
Inherited From WindowOrWorkerGlobalScope.clearInterval
clearTimeout(number | undefined)
function clearTimeout(id: number | undefined)
Parameters
- id
-
number | undefined
Inherited From WindowOrWorkerGlobalScope.clearTimeout
createImageBitmap(ImageBitmapSource, ImageBitmapOptions)
function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>
Parameters
- image
-
ImageBitmapSource
- options
-
ImageBitmapOptions
Returns
Promise<ImageBitmap>
Inherited From WindowOrWorkerGlobalScope.createImageBitmap
createImageBitmap(ImageBitmapSource, number, number, number, number, ImageBitmapOptions)
function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>
Parameters
- image
-
ImageBitmapSource
- sx
-
number
- sy
-
number
- sw
-
number
- sh
-
number
- options
-
ImageBitmapOptions
Returns
Promise<ImageBitmap>
Inherited From WindowOrWorkerGlobalScope.createImageBitmap
dispatchEvent(Event)
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
function dispatchEvent(event: Event): boolean
Parameters
- event
-
Event
Returns
boolean
Inherited From EventTarget.dispatchEvent
fetch(URL | RequestInfo, RequestInit)
function fetch(input: URL | RequestInfo, init?: RequestInit): Promise<Response>
Parameters
- input
-
URL | RequestInfo
- init
-
RequestInit
Returns
Promise<Response>
Inherited From WindowOrWorkerGlobalScope.fetch
queueMicrotask(VoidFunction)
function queueMicrotask(callback: VoidFunction)
Parameters
- callback
-
VoidFunction
Inherited From WindowOrWorkerGlobalScope.queueMicrotask
reportError(any)
function reportError(e: any)
Parameters
- e
-
any
Inherited From WindowOrWorkerGlobalScope.reportError
requestAnimationFrame(FrameRequestCallback)
function requestAnimationFrame(callback: FrameRequestCallback): number
Parameters
- callback
-
FrameRequestCallback
Returns
number
Inherited From AnimationFrameProvider.requestAnimationFrame
setInterval(TimerHandler, number, any[])
function setInterval(handler: TimerHandler, timeout?: number, arguments: any[]): number
Parameters
- handler
-
TimerHandler
- timeout
-
number
- arguments
-
any[]
Returns
number
Inherited From WindowOrWorkerGlobalScope.setInterval
setTimeout(TimerHandler, number, any[])
function setTimeout(handler: TimerHandler, timeout?: number, arguments: any[]): number
Parameters
- handler
-
TimerHandler
- timeout
-
number
- arguments
-
any[]
Returns
number
Inherited From WindowOrWorkerGlobalScope.setTimeout
structuredClone<T>(T, StructuredSerializeOptions)
function structuredClone<T>(value: T, options?: StructuredSerializeOptions): T
Parameters
- value
-
T
- options
-
StructuredSerializeOptions
Returns
T
Inherited From WindowOrWorkerGlobalScope.structuredClone