Window interface

The Window interface represents a window containing a DOM document; the document property points to the DOM document loaded in that window.

MDN Reference

Extends

EventTarget,AnimationFrameProvider,GlobalEventHandlers,WindowEventHandlers,WindowLocalStorage,WindowOrWorkerGlobalScope,WindowSessionStorage

Properties

clientInformation
closed

The Window.closed read-only property indicates whether the referenced window is closed or not.

MDN Reference

cookieStore

The cookieStore read-only property of the Window interface returns a reference to the CookieStore object for the current document context.

MDN Reference

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.

MDN Reference

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.

MDN Reference

document

window.document returns a reference to the document contained in the window.

MDN Reference

event

The read-only Window property event returns the Event which is currently being handled by the site's code.

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.

frameElement

The Window.frameElement property returns the element (such as iframe or object) in which the window is embedded.

MDN Reference

frames

Returns the window itself, which is an array-like object, listing the direct sub-frames of the current window.

MDN Reference

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).

MDN Reference

innerHeight

The read-only innerHeight property of the including the height of the horizontal scroll bar, if present.

MDN Reference

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).

MDN Reference

length

Returns the number of frames (either frame or A number.

MDN Reference

location

The Window.location read-only property returns a Location object with information about the current location of the document.

MDN Reference

locationbar

Returns the locationbar object.

MDN Reference

menubar

Returns the menubar object.

MDN Reference

msCrypto
name

The Window.name property gets/sets the name of the window's browsing context.

MDN Reference

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.

MDN Reference

ondevicemotion

Available only in secure contexts.

MDN Reference

ondeviceorientation

Available only in secure contexts.

MDN Reference

ondeviceorientationabsolute

Available only in secure contexts.

MDN Reference

onorientationchange
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.

MDN Reference

orientation

Returns the orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation.

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.

MDN Reference

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.

MDN Reference

outerWidth

Window.outerWidth read-only property returns the width of the outside of the browser window.

MDN Reference

pageXOffset

MDN Reference

pageYOffset

MDN Reference

parent

The Window.parent property is a reference to the parent of the current window or subframe.

MDN Reference

personalbar

Returns the personalbar object.

MDN Reference

powerbi
powerBISDKGlobalServiceInstanceName
screen

The Window property screen returns a reference to the screen object associated with the window.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

scrollbars

Returns the scrollbars object.

MDN Reference

scrollX

The read-only scrollX property of the Window interface returns the number of pixels by which the document is currently scrolled horizontally.

MDN Reference

scrollY

The read-only scrollY property of the Window interface returns the number of pixels by which the document is currently scrolled vertically.

MDN Reference

self

The Window.self read-only property returns the window itself, as a WindowProxy.

MDN Reference

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.

MDN Reference

status

The status property of the bar at the bottom of the browser window.

statusbar

Returns the statusbar object.

MDN Reference

toolbar

Returns the toolbar object.

MDN Reference

top

Returns a reference to the topmost window in the window hierarchy.

MDN Reference

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.

MDN Reference

window

The window property of a Window object points to the window object itself.

MDN Reference

Inherited Properties

caches

Available only in secure contexts.

MDN Reference

crossOriginIsolated

MDN Reference

crypto

MDN Reference

indexedDB

MDN Reference

isSecureContext

MDN Reference

localStorage

MDN Reference

onabort

MDN Reference

onafterprint

MDN Reference

onanimationcancel

MDN Reference

onanimationend

MDN Reference

onanimationiteration

MDN Reference

onanimationstart

MDN Reference

onauxclick

MDN Reference

onbeforeinput

MDN Reference

onbeforematch

MDN Reference

onbeforeprint

MDN Reference

onbeforetoggle

MDN Reference

onbeforeunload

MDN Reference

onblur

MDN Reference

oncancel

MDN Reference

oncanplay

MDN Reference

oncanplaythrough

MDN Reference

onchange

MDN Reference

onclick

MDN Reference

onclose

MDN Reference

oncontextlost

MDN Reference

oncontextmenu

MDN Reference

oncontextrestored

MDN Reference

oncopy

MDN Reference

oncuechange

MDN Reference

oncut

MDN Reference

ondblclick

MDN Reference

ondrag

MDN Reference

ondragend

MDN Reference

ondragenter

MDN Reference

ondragleave

MDN Reference

ondragover

MDN Reference

ondragstart

MDN Reference

ondrop

MDN Reference

ondurationchange

MDN Reference

onemptied

MDN Reference

onended

MDN Reference

onerror

MDN Reference

onfocus

MDN Reference

onformdata

MDN Reference

ongamepadconnected

MDN Reference

ongamepaddisconnected

MDN Reference

ongotpointercapture

MDN Reference

onhashchange

MDN Reference

oninput

MDN Reference

oninvalid

MDN Reference

onkeydown

MDN Reference

onkeypress
onkeyup

MDN Reference

onlanguagechange

MDN Reference

onload

MDN Reference

onloadeddata

MDN Reference

onloadedmetadata

MDN Reference

onloadstart

MDN Reference

onlostpointercapture

MDN Reference

onmessage

MDN Reference

onmessageerror

MDN Reference

onmousedown

MDN Reference

onmouseenter

MDN Reference

onmouseleave

MDN Reference

onmousemove

MDN Reference

onmouseout

MDN Reference

onmouseover

MDN Reference

onmouseup

MDN Reference

onoffline

MDN Reference

ononline

MDN Reference

onpagehide

MDN Reference

onpagereveal

MDN Reference

onpageshow

MDN Reference

onpageswap

MDN Reference

onpaste

MDN Reference

onpause

MDN Reference

onplay

MDN Reference

onplaying

MDN Reference

onpointercancel

MDN Reference

onpointerdown

MDN Reference

onpointerenter

MDN Reference

onpointerleave

MDN Reference

onpointermove

MDN Reference

onpointerout

MDN Reference

onpointerover

MDN Reference

onpointerrawupdate

Available only in secure contexts.

MDN Reference

onpointerup

MDN Reference

onpopstate

MDN Reference

onprogress

MDN Reference

onratechange

MDN Reference

onrejectionhandled

MDN Reference

onreset

MDN Reference

onresize

MDN Reference

onscroll

MDN Reference

onscrollend

MDN Reference

onsecuritypolicyviolation

MDN Reference

onseeked

MDN Reference

onseeking

MDN Reference

onselect

MDN Reference

onselectionchange

MDN Reference

onselectstart

MDN Reference

onslotchange

MDN Reference

onstalled

MDN Reference

onstorage

MDN Reference

onsubmit

MDN Reference

onsuspend

MDN Reference

ontimeupdate

MDN Reference

ontoggle

MDN Reference

ontouchcancel

MDN Reference

ontouchend

MDN Reference

ontouchmove

MDN Reference

ontouchstart

MDN Reference

ontransitioncancel

MDN Reference

ontransitionend

MDN Reference

ontransitionrun

MDN Reference

ontransitionstart

MDN Reference

onunhandledrejection

MDN Reference

onunload
onvolumechange

MDN Reference

onwaiting

MDN Reference

onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationstart
onwebkittransitionend
onwheel

MDN Reference

origin

MDN Reference

performance

MDN Reference

sessionStorage

MDN Reference

Methods

addEventListener(string, EventListenerOrEventListenerObject, 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.

MDN Reference

alert(any)

window.alert() instructs the browser to display a dialog with an optional message, and to wait until the user dismisses the dialog.

MDN Reference

blur()

The Window.blur() method does nothing.

cancelIdleCallback(number)

The window.cancelIdleCallback() method cancels a callback previously scheduled with window.requestIdleCallback().

MDN Reference

captureEvents()

The Window.captureEvents() method does nothing.

close()

The Window.close() method closes the current window, or the window on which it was called.

MDN Reference

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.

MDN Reference

focus()

Makes a request to bring the window to the front.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

moveBy(number, number)

The moveBy() method of the Window interface moves the current window by a specified amount.

MDN Reference

moveTo(number, number)

The moveTo() method of the Window interface moves the current window to the specified coordinates.

MDN Reference

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.

MDN Reference

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.

MDN Reference

postMessage(any, WindowPostMessageOptions)
print()

Opens the print dialog to print the current document.

MDN Reference

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.

MDN Reference

releaseEvents()

Releases the window from trapping events of a specific type.

removeEventListener(string, EventListenerOrEventListenerObject, 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.

MDN Reference

requestIdleCallback(IdleRequestCallback, IdleRequestOptions)

The window.requestIdleCallback() method queues a function to be called during a browser's idle periods.

MDN Reference

resizeBy(number, number)

The Window.resizeBy() method resizes the current window by a specified amount.

MDN Reference

resizeTo(number, number)

The Window.resizeTo() method dynamically resizes the window.

MDN Reference

scroll(number, number)
scroll(ScrollToOptions)

The Window.scroll() method scrolls the window to a particular place in the document.

MDN Reference

scrollBy(number, number)
scrollBy(ScrollToOptions)

The Window.scrollBy() method scrolls the document in the window by the given amount.

MDN Reference

scrollTo(number, number)
scrollTo(ScrollToOptions)

Window.scrollTo() scrolls to a particular set of coordinates in the document.

MDN Reference

stop()

The window.stop() stops further resource loading in the current browsing context, equivalent to the stop button in the browser.

MDN Reference

Property Details

clientInformation

Warning

This API is now deprecated.

This is a legacy alias of navigator.

MDN Reference

clientInformation: Navigator

Property Value

Navigator

closed

The Window.closed read-only property indicates whether the referenced window is closed or not.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

devicePixelRatio: number

Property Value

number

document

window.document returns a reference to the document contained in the window.

MDN Reference

document: Document

Property Value

event

Warning

This API is now deprecated.

MDN Reference

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

Warning

This API is now deprecated.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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).

MDN Reference

history: History

Property Value

History

innerHeight

The read-only innerHeight property of the including the height of the horizontal scroll bar, if present.

MDN Reference

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).

MDN Reference

innerWidth: number

Property Value

number

length

Returns the number of frames (either frame or A number.

MDN Reference

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.

MDN Reference

Location location

Property Value

Location

locationbar

Returns the locationbar object.

MDN Reference

locationbar: BarProp

Property Value

BarProp

menubar

Returns the menubar object.

MDN Reference

menubar: BarProp

Property Value

BarProp

msCrypto

msCrypto: Crypto

Property Value

Crypto

name

The Window.name property gets/sets the name of the window's browsing context.

MDN Reference

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.

MDN Reference

navigator: Navigator

Property Value

Navigator

ondevicemotion

Available only in secure contexts.

MDN Reference

ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any | null

Property Value

(this: Window, ev: DeviceMotionEvent) => any | null

ondeviceorientation

Available only in secure contexts.

MDN Reference

ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any | null

Property Value

(this: Window, ev: DeviceOrientationEvent) => any | null

ondeviceorientationabsolute

Available only in secure contexts.

MDN Reference

ondeviceorientationabsolute: (this: Window, ev: DeviceOrientationEvent) => any | null

Property Value

(this: Window, ev: DeviceOrientationEvent) => any | null

onorientationchange

Warning

This API is now deprecated.

MDN Reference

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.

MDN Reference

opener: any

Property Value

any

orientation

Warning

This API is now deprecated.

MDN Reference

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.

MDN Reference

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.

MDN Reference

outerHeight: number

Property Value

number

outerWidth

Window.outerWidth read-only property returns the width of the outside of the browser window.

MDN Reference

outerWidth: number

Property Value

number

pageXOffset

MDN Reference

pageXOffset: number

Property Value

number

pageYOffset

MDN Reference

pageYOffset: number

Property Value

number

parent

The Window.parent property is a reference to the parent of the current window or subframe.

MDN Reference

parent: Window

Property Value

personalbar

Returns the personalbar object.

MDN Reference

personalbar: BarProp

Property Value

BarProp

powerbi

powerbi: Service

Property Value

powerBISDKGlobalServiceInstanceName

powerBISDKGlobalServiceInstanceName?: string

Property Value

string

screen

The Window property screen returns a reference to the screen object associated with the window.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

screenY: number

Property Value

number

scrollbars

Returns the scrollbars object.

MDN Reference

scrollbars: BarProp

Property Value

BarProp

scrollX

The read-only scrollX property of the Window interface returns the number of pixels by which the document is currently scrolled horizontally.

MDN Reference

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.

MDN Reference

scrollY: number

Property Value

number

self

The Window.self read-only property returns the window itself, as a WindowProxy.

MDN Reference

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.

MDN Reference

speechSynthesis: SpeechSynthesis

Property Value

SpeechSynthesis

status

Warning

This API is now deprecated.

MDN Reference

The status property of the bar at the bottom of the browser window.

status: string

Property Value

string

statusbar

Returns the statusbar object.

MDN Reference

statusbar: BarProp

Property Value

BarProp

toolbar

Returns the toolbar object.

MDN Reference

toolbar: BarProp

Property Value

BarProp

top

Returns a reference to the topmost window in the window hierarchy.

MDN Reference

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.

MDN Reference

visualViewport: VisualViewport | null

Property Value

VisualViewport | null

window

The window property of a Window object points to the window object itself.

MDN Reference

window: Window & typeof globalThis

Property Value

Window & typeof globalThis

Inherited Property Details

caches

Available only in secure contexts.

MDN Reference

caches: CacheStorage

Property Value

CacheStorage

Inherited From WindowOrWorkerGlobalScope.caches

crossOriginIsolated

MDN Reference

crossOriginIsolated: boolean

Property Value

boolean

Inherited From WindowOrWorkerGlobalScope.crossOriginIsolated

crypto

MDN Reference

crypto: Crypto

Property Value

Crypto

Inherited From WindowOrWorkerGlobalScope.crypto

indexedDB

MDN Reference

indexedDB: IDBFactory

Property Value

IDBFactory

Inherited From WindowOrWorkerGlobalScope.indexedDB

isSecureContext

MDN Reference

isSecureContext: boolean

Property Value

boolean

Inherited From WindowOrWorkerGlobalScope.isSecureContext

localStorage

MDN Reference

localStorage: Storage

Property Value

Storage

Inherited From WindowLocalStorage.localStorage

onabort

MDN Reference

onabort: (this: GlobalEventHandlers, ev: UIEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: UIEvent) => any | null

Inherited From GlobalEventHandlers.onabort

onafterprint

MDN Reference

onafterprint: (this: WindowEventHandlers, ev: Event) => any | null

Property Value

(this: WindowEventHandlers, ev: Event) => any | null

Inherited From WindowEventHandlers.onafterprint

onanimationcancel

MDN Reference

onanimationcancel: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From GlobalEventHandlers.onanimationcancel

onanimationend

MDN Reference

onanimationend: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From GlobalEventHandlers.onanimationend

onanimationiteration

MDN Reference

onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From GlobalEventHandlers.onanimationiteration

onanimationstart

MDN Reference

onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From GlobalEventHandlers.onanimationstart

onauxclick

MDN Reference

onauxclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onauxclick

onbeforeinput

MDN Reference

onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: InputEvent) => any | null

Inherited From GlobalEventHandlers.onbeforeinput

onbeforematch

MDN Reference

onbeforematch: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onbeforematch

onbeforeprint

MDN Reference

onbeforeprint: (this: WindowEventHandlers, ev: Event) => any | null

Property Value

(this: WindowEventHandlers, ev: Event) => any | null

Inherited From WindowEventHandlers.onbeforeprint

onbeforetoggle

MDN Reference

onbeforetoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Inherited From GlobalEventHandlers.onbeforetoggle

onbeforeunload

MDN Reference

onbeforeunload: (this: WindowEventHandlers, ev: BeforeUnloadEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: BeforeUnloadEvent) => any | null

Inherited From WindowEventHandlers.onbeforeunload

onblur

MDN Reference

onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: FocusEvent) => any | null

Inherited From GlobalEventHandlers.onblur

oncancel

MDN Reference

oncancel: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncancel

oncanplay

MDN Reference

oncanplay: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncanplay

oncanplaythrough

MDN Reference

oncanplaythrough: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncanplaythrough

onchange

MDN Reference

onchange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onchange

onclick

MDN Reference

onclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onclick

onclose

MDN Reference

onclose: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onclose

oncontextlost

MDN Reference

oncontextlost: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncontextlost

oncontextmenu

MDN Reference

oncontextmenu: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.oncontextmenu

oncontextrestored

MDN Reference

oncontextrestored: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncontextrestored

oncopy

MDN Reference

oncopy: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Inherited From GlobalEventHandlers.oncopy

oncuechange

MDN Reference

oncuechange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncuechange

oncut

MDN Reference

oncut: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Inherited From GlobalEventHandlers.oncut

ondblclick

MDN Reference

ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.ondblclick

ondrag

MDN Reference

ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondrag

ondragend

MDN Reference

ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragend

ondragenter

MDN Reference

ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragenter

ondragleave

MDN Reference

ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragleave

ondragover

MDN Reference

ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragover

ondragstart

MDN Reference

ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragstart

ondrop

MDN Reference

ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondrop

ondurationchange

MDN Reference

ondurationchange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.ondurationchange

onemptied

MDN Reference

onemptied: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onemptied

onended

MDN Reference

onended: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onended

onerror

MDN Reference

onerror: OnErrorEventHandler

Property Value

OnErrorEventHandler

Inherited From GlobalEventHandlers.onerror

onfocus

MDN Reference

onfocus: (this: GlobalEventHandlers, ev: FocusEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: FocusEvent) => any | null

Inherited From GlobalEventHandlers.onfocus

onformdata

MDN Reference

onformdata: (this: GlobalEventHandlers, ev: FormDataEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: FormDataEvent) => any | null

Inherited From GlobalEventHandlers.onformdata

ongamepadconnected

MDN Reference

ongamepadconnected: (this: WindowEventHandlers, ev: GamepadEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: GamepadEvent) => any | null

Inherited From WindowEventHandlers.ongamepadconnected

ongamepaddisconnected

MDN Reference

ongamepaddisconnected: (this: WindowEventHandlers, ev: GamepadEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: GamepadEvent) => any | null

Inherited From WindowEventHandlers.ongamepaddisconnected

ongotpointercapture

MDN Reference

ongotpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.ongotpointercapture

onhashchange

MDN Reference

onhashchange: (this: WindowEventHandlers, ev: HashChangeEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: HashChangeEvent) => any | null

Inherited From WindowEventHandlers.onhashchange

oninput

MDN Reference

oninput: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oninput

oninvalid

MDN Reference

oninvalid: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oninvalid

onkeydown

MDN Reference

onkeydown: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Inherited From GlobalEventHandlers.onkeydown

onkeypress

Warning

This API is now deprecated.

MDN Reference

onkeypress: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Inherited From GlobalEventHandlers.onkeypress

onkeyup

MDN Reference

onkeyup: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Inherited From GlobalEventHandlers.onkeyup

onlanguagechange

MDN Reference

onlanguagechange: (this: WindowEventHandlers, ev: Event) => any | null

Property Value

(this: WindowEventHandlers, ev: Event) => any | null

Inherited From WindowEventHandlers.onlanguagechange

onload

MDN Reference

onload: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onload

onloadeddata

MDN Reference

onloadeddata: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onloadeddata

onloadedmetadata

MDN Reference

onloadedmetadata: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onloadedmetadata

onloadstart

MDN Reference

onloadstart: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onloadstart

onlostpointercapture

MDN Reference

onlostpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onlostpointercapture

onmessage

MDN Reference

onmessage: (this: WindowEventHandlers, ev: MessageEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: MessageEvent) => any | null

Inherited From WindowEventHandlers.onmessage

onmessageerror

MDN Reference

onmessageerror: (this: WindowEventHandlers, ev: MessageEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: MessageEvent) => any | null

Inherited From WindowEventHandlers.onmessageerror

onmousedown

MDN Reference

onmousedown: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmousedown

onmouseenter

MDN Reference

onmouseenter: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseenter

onmouseleave

MDN Reference

onmouseleave: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseleave

onmousemove

MDN Reference

onmousemove: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmousemove

onmouseout

MDN Reference

onmouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseout

onmouseover

MDN Reference

onmouseover: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseover

onmouseup

MDN Reference

onmouseup: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseup

onoffline

MDN Reference

onoffline: (this: WindowEventHandlers, ev: Event) => any | null

Property Value

(this: WindowEventHandlers, ev: Event) => any | null

Inherited From WindowEventHandlers.onoffline

ononline

MDN Reference

ononline: (this: WindowEventHandlers, ev: Event) => any | null

Property Value

(this: WindowEventHandlers, ev: Event) => any | null

Inherited From WindowEventHandlers.ononline

onpagehide

MDN Reference

onpagehide: (this: WindowEventHandlers, ev: PageTransitionEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: PageTransitionEvent) => any | null

Inherited From WindowEventHandlers.onpagehide

onpagereveal

MDN Reference

onpagereveal: (this: WindowEventHandlers, ev: PageRevealEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: PageRevealEvent) => any | null

Inherited From WindowEventHandlers.onpagereveal

onpageshow

MDN Reference

onpageshow: (this: WindowEventHandlers, ev: PageTransitionEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: PageTransitionEvent) => any | null

Inherited From WindowEventHandlers.onpageshow

onpageswap

MDN Reference

onpageswap: (this: WindowEventHandlers, ev: PageSwapEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: PageSwapEvent) => any | null

Inherited From WindowEventHandlers.onpageswap

onpaste

MDN Reference

onpaste: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Inherited From GlobalEventHandlers.onpaste

onpause

MDN Reference

onpause: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onpause

onplay

MDN Reference

onplay: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onplay

onplaying

MDN Reference

onplaying: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onplaying

onpointercancel

MDN Reference

onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointercancel

onpointerdown

MDN Reference

onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerdown

onpointerenter

MDN Reference

onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerenter

onpointerleave

MDN Reference

onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerleave

onpointermove

MDN Reference

onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointermove

onpointerout

MDN Reference

onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerout

onpointerover

MDN Reference

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.

MDN Reference

onpointerrawupdate: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onpointerrawupdate

onpointerup

MDN Reference

onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerup

onpopstate

MDN Reference

onpopstate: (this: WindowEventHandlers, ev: PopStateEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: PopStateEvent) => any | null

Inherited From WindowEventHandlers.onpopstate

onprogress

MDN Reference

onprogress: (this: GlobalEventHandlers, ev: ProgressEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ProgressEvent) => any | null

Inherited From GlobalEventHandlers.onprogress

onratechange

MDN Reference

onratechange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onratechange

onrejectionhandled

MDN Reference

onrejectionhandled: (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null

Inherited From WindowEventHandlers.onrejectionhandled

onreset

MDN Reference

onreset: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onreset

onresize

MDN Reference

onresize: (this: GlobalEventHandlers, ev: UIEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: UIEvent) => any | null

Inherited From GlobalEventHandlers.onresize

onscroll

MDN Reference

onscroll: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onscroll

onscrollend

MDN Reference

onscrollend: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onscrollend

onsecuritypolicyviolation

MDN Reference

onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null

Inherited From GlobalEventHandlers.onsecuritypolicyviolation

onseeked

MDN Reference

onseeked: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onseeked

onseeking

MDN Reference

onseeking: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onseeking

onselect

MDN Reference

onselect: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onselect

onselectionchange

MDN Reference

onselectionchange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onselectionchange

onselectstart

MDN Reference

onselectstart: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onselectstart

onslotchange

MDN Reference

onslotchange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onslotchange

onstalled

MDN Reference

onstalled: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onstalled

onstorage

MDN Reference

onstorage: (this: WindowEventHandlers, ev: StorageEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: StorageEvent) => any | null

Inherited From WindowEventHandlers.onstorage

onsubmit

MDN Reference

onsubmit: (this: GlobalEventHandlers, ev: SubmitEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: SubmitEvent) => any | null

Inherited From GlobalEventHandlers.onsubmit

onsuspend

MDN Reference

onsuspend: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onsuspend

ontimeupdate

MDN Reference

ontimeupdate: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.ontimeupdate

ontoggle

MDN Reference

ontoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Inherited From GlobalEventHandlers.ontoggle

ontouchcancel

MDN Reference

ontouchcancel?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From GlobalEventHandlers.ontouchcancel

ontouchend

MDN Reference

ontouchend?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From GlobalEventHandlers.ontouchend

ontouchmove

MDN Reference

ontouchmove?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From GlobalEventHandlers.ontouchmove

ontouchstart

MDN Reference

ontouchstart?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From GlobalEventHandlers.ontouchstart

ontransitioncancel

MDN Reference

ontransitioncancel: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From GlobalEventHandlers.ontransitioncancel

ontransitionend

MDN Reference

ontransitionend: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From GlobalEventHandlers.ontransitionend

ontransitionrun

MDN Reference

ontransitionrun: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From GlobalEventHandlers.ontransitionrun

ontransitionstart

MDN Reference

ontransitionstart: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From GlobalEventHandlers.ontransitionstart

onunhandledrejection

MDN Reference

onunhandledrejection: (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null

Property Value

(this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null

Inherited From WindowEventHandlers.onunhandledrejection

onunload

Warning

This API is now deprecated.

MDN Reference

onunload: (this: WindowEventHandlers, ev: Event) => any | null

Property Value

(this: WindowEventHandlers, ev: Event) => any | null

Inherited From WindowEventHandlers.onunload

onvolumechange

MDN Reference

onvolumechange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onvolumechange

onwaiting

MDN Reference

onwaiting: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwaiting

onwebkitanimationend

Warning

This API is now deprecated.

This is a legacy alias of onanimationend.

MDN Reference

onwebkitanimationend: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwebkitanimationend

onwebkitanimationiteration

Warning

This API is now deprecated.

This is a legacy alias of onanimationiteration.

MDN Reference

onwebkitanimationiteration: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwebkitanimationiteration

onwebkitanimationstart

Warning

This API is now deprecated.

This is a legacy alias of onanimationstart.

MDN Reference

onwebkitanimationstart: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwebkitanimationstart

onwebkittransitionend

Warning

This API is now deprecated.

This is a legacy alias of ontransitionend.

MDN Reference

onwebkittransitionend: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwebkittransitionend

onwheel

MDN Reference

onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: WheelEvent) => any | null

Inherited From GlobalEventHandlers.onwheel

origin

MDN Reference

origin: string

Property Value

string

Inherited From WindowOrWorkerGlobalScope.origin

performance

MDN Reference

performance: Performance

Property Value

Performance

Inherited From WindowOrWorkerGlobalScope.performance

sessionStorage

MDN Reference

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.

MDN Reference

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.

MDN Reference

function alert(message?: any)

Parameters

message

any

blur()

Warning

This API is now deprecated.

MDN Reference

The Window.blur() method does nothing.

function blur()

cancelIdleCallback(number)

The window.cancelIdleCallback() method cancels a callback previously scheduled with window.requestIdleCallback().

MDN Reference

function cancelIdleCallback(handle: number)

Parameters

handle

number

captureEvents()

Warning

This API is now deprecated.

MDN Reference

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.

MDN Reference

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.

MDN Reference

function confirm(message?: string): boolean

Parameters

message

string

Returns

boolean

focus()

Makes a request to bring the window to the front.

MDN Reference

function 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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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()

Opens the print dialog to print the current document.

MDN Reference

function 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.

MDN Reference

function prompt(message?: string, _default?: string): string | null

Parameters

message

string

_default

string

Returns

string | null

releaseEvents()

Warning

This API is now deprecated.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

function resizeBy(x: number, y: number)

Parameters

x

number

y

number

resizeTo(number, number)

The Window.resizeTo() method dynamically resizes the window.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

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.

MDN Reference

function stop()

Inherited Method Details

atob(string)

MDN Reference

function atob(data: string): string

Parameters

data

string

Returns

string

Inherited From WindowOrWorkerGlobalScope.atob

btoa(string)

MDN Reference

function btoa(data: string): string

Parameters

data

string

Returns

string

Inherited From WindowOrWorkerGlobalScope.btoa

cancelAnimationFrame(number)

MDN Reference

function cancelAnimationFrame(handle: number)

Parameters

handle

number

Inherited From AnimationFrameProvider.cancelAnimationFrame

clearInterval(number | undefined)

MDN Reference

function clearInterval(id: number | undefined)

Parameters

id

number | undefined

Inherited From WindowOrWorkerGlobalScope.clearInterval

clearTimeout(number | undefined)

MDN Reference

function clearTimeout(id: number | undefined)

Parameters

id

number | undefined

Inherited From WindowOrWorkerGlobalScope.clearTimeout

createImageBitmap(ImageBitmapSource, ImageBitmapOptions)

MDN Reference

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.

MDN Reference

function dispatchEvent(event: Event): boolean

Parameters

event

Event

Returns

boolean

Inherited From EventTarget.dispatchEvent

fetch(URL | RequestInfo, RequestInit)

MDN Reference

function fetch(input: URL | RequestInfo, init?: RequestInit): Promise<Response>

Parameters

input

URL | RequestInfo

init

RequestInit

Returns

Promise<Response>

Inherited From WindowOrWorkerGlobalScope.fetch

queueMicrotask(VoidFunction)

MDN Reference

function queueMicrotask(callback: VoidFunction)

Parameters

callback

VoidFunction

Inherited From WindowOrWorkerGlobalScope.queueMicrotask

reportError(any)

MDN Reference

function reportError(e: any)

Parameters

e

any

Inherited From WindowOrWorkerGlobalScope.reportError

requestAnimationFrame(FrameRequestCallback)

MDN Reference

function requestAnimationFrame(callback: FrameRequestCallback): number

Parameters

callback

FrameRequestCallback

Returns

number

Inherited From AnimationFrameProvider.requestAnimationFrame

setInterval(TimerHandler, number, any[])

MDN Reference

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[])

MDN Reference

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)

MDN Reference

function structuredClone<T>(value: T, options?: StructuredSerializeOptions): T

Parameters

value

T

options

StructuredSerializeOptions

Returns

T

Inherited From WindowOrWorkerGlobalScope.structuredClone