A window containing a DOM document; the document property points to the DOM document loaded in that window.

interface Window {
    caches: CacheStorage;
    clientInformation: Navigator;
    closed: boolean;
    crossOriginIsolated: boolean;
    crypto: Crypto;
    customElements: CustomElementRegistry;
    devicePixelRatio: number;
    document: Document;
    event: undefined | Event;
    external: External;
    frameElement: null | Element;
    frames: Window;
    history: History;
    indexedDB: IDBFactory;
    innerHeight: number;
    innerWidth: number;
    isSecureContext: boolean;
    length: number;
    localStorage: Storage;
    locationbar: BarProp;
    menubar: BarProp;
    name: string;
    navigator: Navigator;
    onabort: null | ((this, ev) => any);
    onafterprint: null | ((this, ev) => any);
    onanimationcancel: null | ((this, ev) => any);
    onanimationend: null | ((this, ev) => any);
    onanimationiteration: null | ((this, ev) => any);
    onanimationstart: null | ((this, ev) => any);
    onauxclick: null | ((this, ev) => any);
    onbeforeinput: null | ((this, ev) => any);
    onbeforeprint: null | ((this, ev) => any);
    onbeforeunload: null | ((this, ev) => any);
    onblur: null | ((this, ev) => any);
    oncancel: null | ((this, ev) => any);
    oncanplay: null | ((this, ev) => any);
    oncanplaythrough: null | ((this, ev) => any);
    onchange: null | ((this, ev) => any);
    onclick: null | ((this, ev) => any);
    onclose: null | ((this, ev) => any);
    oncontextmenu: null | ((this, ev) => any);
    oncuechange: null | ((this, ev) => any);
    ondblclick: null | ((this, ev) => any);
    ondevicemotion: null | ((this, ev) => any);
    ondeviceorientation: null | ((this, ev) => any);
    ondrag: null | ((this, ev) => any);
    ondragend: null | ((this, ev) => any);
    ondragenter: null | ((this, ev) => any);
    ondragleave: null | ((this, ev) => any);
    ondragover: null | ((this, ev) => any);
    ondragstart: null | ((this, ev) => any);
    ondrop: null | ((this, ev) => any);
    ondurationchange: null | ((this, ev) => any);
    onemptied: null | ((this, ev) => any);
    onended: null | ((this, ev) => any);
    onerror: OnErrorEventHandler;
    onfocus: null | ((this, ev) => any);
    onformdata: null | ((this, ev) => any);
    ongamepadconnected: null | ((this, ev) => any);
    ongamepaddisconnected: null | ((this, ev) => any);
    ongotpointercapture: null | ((this, ev) => any);
    onhashchange: null | ((this, ev) => any);
    oninput: null | ((this, ev) => any);
    oninvalid: null | ((this, ev) => any);
    onkeydown: null | ((this, ev) => any);
    onkeypress: null | ((this, ev) => any);
    onkeyup: null | ((this, ev) => any);
    onlanguagechange: null | ((this, ev) => any);
    onload: null | ((this, ev) => any);
    onloadeddata: null | ((this, ev) => any);
    onloadedmetadata: null | ((this, ev) => any);
    onloadstart: null | ((this, ev) => any);
    onlostpointercapture: null | ((this, ev) => any);
    onmessage: null | ((this, ev) => any);
    onmessageerror: null | ((this, ev) => any);
    onmousedown: null | ((this, ev) => any);
    onmouseenter: null | ((this, ev) => any);
    onmouseleave: null | ((this, ev) => any);
    onmousemove: null | ((this, ev) => any);
    onmouseout: null | ((this, ev) => any);
    onmouseover: null | ((this, ev) => any);
    onmouseup: null | ((this, ev) => any);
    onoffline: null | ((this, ev) => any);
    ononline: null | ((this, ev) => any);
    onorientationchange: null | ((this, ev) => any);
    onpagehide: null | ((this, ev) => any);
    onpageshow: null | ((this, ev) => any);
    onpause: null | ((this, ev) => any);
    onplay: null | ((this, ev) => any);
    onplaying: null | ((this, ev) => any);
    onpointercancel: null | ((this, ev) => any);
    onpointerdown: null | ((this, ev) => any);
    onpointerenter: null | ((this, ev) => any);
    onpointerleave: null | ((this, ev) => any);
    onpointermove: null | ((this, ev) => any);
    onpointerout: null | ((this, ev) => any);
    onpointerover: null | ((this, ev) => any);
    onpointerup: null | ((this, ev) => any);
    onpopstate: null | ((this, ev) => any);
    onprogress: null | ((this, ev) => any);
    onratechange: null | ((this, ev) => any);
    onrejectionhandled: null | ((this, ev) => any);
    onreset: null | ((this, ev) => any);
    onresize: null | ((this, ev) => any);
    onscroll: null | ((this, ev) => any);
    onsecuritypolicyviolation: null | ((this, ev) => any);
    onseeked: null | ((this, ev) => any);
    onseeking: null | ((this, ev) => any);
    onselect: null | ((this, ev) => any);
    onselectionchange: null | ((this, ev) => any);
    onselectstart: null | ((this, ev) => any);
    onslotchange: null | ((this, ev) => any);
    onstalled: null | ((this, ev) => any);
    onstorage: null | ((this, ev) => any);
    onsubmit: null | ((this, ev) => any);
    onsuspend: null | ((this, ev) => any);
    ontimeupdate: null | ((this, ev) => any);
    ontoggle: null | ((this, ev) => any);
    ontouchcancel?: null | ((this, ev) => any);
    ontouchend?: null | ((this, ev) => any);
    ontouchmove?: null | ((this, ev) => any);
    ontouchstart?: null | ((this, ev) => any);
    ontransitioncancel: null | ((this, ev) => any);
    ontransitionend: null | ((this, ev) => any);
    ontransitionrun: null | ((this, ev) => any);
    ontransitionstart: null | ((this, ev) => any);
    onunhandledrejection: null | ((this, ev) => any);
    onunload: null | ((this, ev) => any);
    onvolumechange: null | ((this, ev) => any);
    onwaiting: null | ((this, ev) => any);
    onwebkitanimationend: null | ((this, ev) => any);
    onwebkitanimationiteration: null | ((this, ev) => any);
    onwebkitanimationstart: null | ((this, ev) => any);
    onwebkittransitionend: null | ((this, ev) => any);
    onwheel: null | ((this, ev) => any);
    opener: any;
    orientation: number;
    origin: string;
    outerHeight: number;
    outerWidth: number;
    pageXOffset: number;
    pageYOffset: number;
    parent: Window;
    performance: Performance;
    personalbar: BarProp;
    screen: Screen;
    screenLeft: number;
    screenTop: number;
    screenX: number;
    screenY: number;
    scrollX: number;
    scrollY: number;
    scrollbars: BarProp;
    self: Window & typeof globalThis;
    sessionStorage: Storage;
    speechSynthesis: SpeechSynthesis;
    status: string;
    statusbar: BarProp;
    toolbar: BarProp;
    top: null | Window;
    visualViewport: null | VisualViewport;
    window: Window & typeof globalThis;
    location: Location;
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    alert(message?): void;
    atob(data): string;
    blur(): void;
    btoa(data): string;
    cancelAnimationFrame(handle): void;
    cancelIdleCallback(handle): void;
    captureEvents(): void;
    clearInterval(id): void;
    clearTimeout(id): void;
    close(): void;
    confirm(message?): boolean;
    createImageBitmap(image, options?): Promise<ImageBitmap>;
    createImageBitmap(image, sx, sy, sw, sh, options?): Promise<ImageBitmap>;
    dispatchEvent(event): boolean;
    fetch(input, init?): Promise<Response>;
    focus(): void;
    getComputedStyle(elt, pseudoElt?): CSSStyleDeclaration;
    getSelection(): null | Selection;
    matchMedia(query): MediaQueryList;
    moveBy(x, y): void;
    moveTo(x, y): void;
    open(url?, target?, features?): null | Window;
    postMessage(message, targetOrigin, transfer?): void;
    postMessage(message, options?): void;
    print(): void;
    prompt(message?, _default?): null | string;
    queueMicrotask(callback): void;
    releaseEvents(): void;
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
    reportError(e): void;
    requestAnimationFrame(callback): number;
    requestIdleCallback(callback, options?): number;
    resizeBy(x, y): void;
    resizeTo(width, height): void;
    scroll(options?): void;
    scroll(x, y): void;
    scrollBy(options?): void;
    scrollBy(x, y): void;
    scrollTo(options?): void;
    scrollTo(x, y): void;
    setInterval(handler, timeout?, ...arguments): number;
    setTimeout(handler, timeout?, ...arguments): number;
    stop(): void;
    structuredClone(value, options?): any;
    [index: number]: Window;
}

Hierarchy (view full)

Indexable

[index: number]: Window

Properties

caches clientInformation closed crossOriginIsolated crypto customElements devicePixelRatio document event external frameElement frames history indexedDB innerHeight innerWidth isSecureContext length localStorage locationbar menubar name navigator onabort onafterprint onanimationcancel onanimationend onanimationiteration onanimationstart onauxclick onbeforeinput onbeforeprint onbeforeunload onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncuechange ondblclick ondevicemotion ondeviceorientation ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformdata ongamepadconnected ongamepaddisconnected ongotpointercapture onhashchange oninput oninvalid onkeydown onkeypress onkeyup onlanguagechange onload onloadeddata onloadedmetadata onloadstart onlostpointercapture onmessage onmessageerror onmousedown onmouseenter onmouseleave onmousemove onmouseout onmouseover onmouseup onoffline ononline onorientationchange onpagehide onpageshow onpause onplay onplaying onpointercancel onpointerdown onpointerenter onpointerleave onpointermove onpointerout onpointerover onpointerup onpopstate onprogress onratechange onrejectionhandled onreset onresize onscroll onsecuritypolicyviolation onseeked onseeking onselect onselectionchange onselectstart onslotchange onstalled onstorage onsubmit onsuspend ontimeupdate ontoggle ontouchcancel? ontouchend? ontouchmove? ontouchstart? ontransitioncancel ontransitionend ontransitionrun ontransitionstart onunhandledrejection onunload onvolumechange onwaiting onwebkitanimationend onwebkitanimationiteration onwebkitanimationstart onwebkittransitionend onwheel opener orientation origin outerHeight outerWidth pageXOffset pageYOffset parent performance personalbar screen screenLeft screenTop screenX screenY scrollX scrollY scrollbars self sessionStorage speechSynthesis status statusbar toolbar top visualViewport window

Accessors

Methods

Properties

caches: CacheStorage

Available only in secure contexts.

clientInformation: Navigator

Deprecated

This is a legacy alias of navigator.

closed: boolean

Returns true if the window has been closed, false otherwise.

crossOriginIsolated: boolean
crypto: Crypto
customElements: CustomElementRegistry

Defines a new custom element, mapping the given name to the given constructor as an autonomous custom element.

devicePixelRatio: number
document: Document
event: undefined | Event

Deprecated

external: External

Deprecated

frameElement: null | Element
frames: Window
history: History
indexedDB: IDBFactory
innerHeight: number
innerWidth: number
isSecureContext: boolean
length: number
localStorage: Storage
locationbar: BarProp

Returns true if the location bar is visible; otherwise, returns false.

menubar: BarProp

Returns true if the menu bar is visible; otherwise, returns false.

name: string
navigator: Navigator
onabort: null | ((this, ev) => any)

Fires when the user aborts the download.

Type declaration

Param: ev

The event.

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Fires when the object loses the input focus.

Type declaration

Param: ev

The focus event.

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

Type declaration

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

Occurs when playback is possible, but would require further buffering.

Type declaration

Param: ev

The event.

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

Type declaration

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

Fires when the contents of the object or selection have changed.

Type declaration

Param: ev

The event.

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

Fires when the user clicks the left mouse button on the object

Type declaration

Param: ev

The mouse event.

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

Type declaration

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

Fires when the user clicks the right mouse button in the client area, opening the context menu.

Type declaration

Param: ev

The mouse event.

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

Type declaration

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

Fires when the user double-clicks the object.

Type declaration

Param: ev

The mouse event.

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

Available only in secure contexts.

Type declaration

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

Available only in secure contexts.

Type declaration

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

Fires on the source object continuously during a drag operation.

Type declaration

Param: ev

The event.

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

Fires on the source object when the user releases the mouse at the close of a drag operation.

Type declaration

Param: ev

The event.

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

Fires on the target element when the user drags the object to a valid drop target.

Type declaration

Param: ev

The drag event.

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

Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

Type declaration

Param: ev

The drag event.

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

Fires on the target element continuously while the user drags the object over a valid drop target.

Type declaration

Param: ev

The event.

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

Fires on the source object when the user starts to drag a text selection or selected object.

Type declaration

Param: ev

The event.

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

Type declaration

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

Occurs when the duration attribute is updated.

Type declaration

Param: ev

The event.

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

Occurs when the media element is reset to its initial state.

Type declaration

Param: ev

The event.

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

Occurs when the end of playback is reached.

Type declaration

Param: ev

The event

Fires when an error occurs during object loading.

Param: ev

The event.

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

Fires when the object receives focus.

Type declaration

Param: ev

The event.

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Fires when the user presses a key.

Type declaration

Param: ev

The keyboard event

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

Fires when the user presses an alphanumeric key.

Type declaration

Param: ev

The event.

Deprecated

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

Fires when the user releases a key.

Type declaration

Param: ev

The keyboard event

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

Type declaration

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

Fires immediately after the browser loads the object.

Type declaration

Param: ev

The event.

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

Occurs when media data is loaded at the current playback position.

Type declaration

Param: ev

The event.

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

Occurs when the duration and dimensions of the media have been determined.

Type declaration

Param: ev

The event.

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

Occurs when Internet Explorer begins looking for media data.

Type declaration

Param: ev

The event.

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

Type declaration

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

Type declaration

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

Type declaration

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

Fires when the user clicks the object with either mouse button.

Type declaration

Param: ev

The mouse event.

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

Type declaration

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

Type declaration

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

Fires when the user moves the mouse over the object.

Type declaration

Param: ev

The mouse event.

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

Fires when the user moves the mouse pointer outside the boundaries of the object.

Type declaration

Param: ev

The mouse event.

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

Fires when the user moves the mouse pointer into the object.

Type declaration

Param: ev

The mouse event.

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

Fires when the user releases a mouse button while the mouse is over the object.

Type declaration

Param: ev

The mouse event.

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

Type declaration

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

Type declaration

onorientationchange: null | ((this, ev) => any)

Type declaration

    • (this, ev): any
    • Parameters

      Returns any

Deprecated

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

Type declaration

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

Type declaration

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

Occurs when playback is paused.

Type declaration

Param: ev

The event.

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

Occurs when the play method is requested.

Type declaration

Param: ev

The event.

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

Occurs when the audio or video has started playing.

Type declaration

Param: ev

The event.

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

onpointerover: null | ((this, ev) => any)

Type declaration

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

Type declaration

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

Type declaration

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

Occurs to indicate progress while downloading media data.

Type declaration

Param: ev

The event.

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

Occurs when the playback rate is increased or decreased.

Type declaration

Param: ev

The event.

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

Type declaration

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

Fires when the user resets a form.

Type declaration

Param: ev

The event.

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

Type declaration

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

Fires when the user repositions the scroll box in the scroll bar on the object.

Type declaration

Param: ev

The event.

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

Type declaration

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

Occurs when the seek operation ends.

Type declaration

Param: ev

The event.

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

Occurs when the current playback position is moved.

Type declaration

Param: ev

The event.

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

Fires when the current selection changes.

Type declaration

Param: ev

The event.

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

Type declaration

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

Type declaration

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

Type declaration

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

Occurs when the download has stopped.

Type declaration

Param: ev

The event.

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

Type declaration

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

Type declaration

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

Occurs if the load operation has been intentionally halted.

Type declaration

Param: ev

The event.

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

Occurs to indicate the current playback position.

Type declaration

Param: ev

The event.

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Occurs when the volume is changed, or playback is muted or unmuted.

Type declaration

Param: ev

The event.

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

Occurs when playback stops because the next frame of a video resource is not available.

Type declaration

Param: ev

The event.

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

Type declaration

Deprecated

This is a legacy alias of onanimationend.

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

Type declaration

Deprecated

This is a legacy alias of onanimationiteration.

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

Type declaration

Deprecated

This is a legacy alias of onanimationstart.

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

Type declaration

Deprecated

This is a legacy alias of ontransitionend.

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

Type declaration

opener: any
orientation: number

Deprecated

origin: string
outerHeight: number
outerWidth: number
pageXOffset: number

Deprecated

This is a legacy alias of scrollX.

pageYOffset: number

Deprecated

This is a legacy alias of scrollY.

parent: Window

Refers to either the parent WindowProxy, or itself.

It can rarely be null e.g. for contentWindow of an iframe that is already removed from the parent.

performance: Performance
personalbar: BarProp

Returns true if the personal bar is visible; otherwise, returns false.

screen: Screen
screenLeft: number
screenTop: number
screenX: number
screenY: number
scrollX: number
scrollY: number
scrollbars: BarProp

Returns true if the scrollbars are visible; otherwise, returns false.

self: Window & typeof globalThis
sessionStorage: Storage
speechSynthesis: SpeechSynthesis
status: string

Deprecated

statusbar: BarProp

Returns true if the status bar is visible; otherwise, returns false.

toolbar: BarProp

Returns true if the toolbar is visible; otherwise, returns false.

top: null | Window
visualViewport: null | VisualViewport
window: Window & typeof globalThis

Accessors

Methods

  • Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.

    The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.

    When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.

    When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.

    When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.

    If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.

    The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.

    Type Parameters

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • Optional message: any

    Returns void

  • Returns void

  • Parameters

    • handle: number

    Returns void

  • Returns void

    Deprecated

  • Closes the window.

    Returns void

  • Parameters

    • Optional message: string

    Returns boolean

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    Returns boolean

  • Moves the focus to the window's browsing context, if any.

    Returns void

  • Parameters

    • elt: Element
    • Optional pseudoElt: null | string

    Returns CSSStyleDeclaration

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • Optional url: string | URL
    • Optional target: string
    • Optional features: string

    Returns null | Window

  • Posts a message to the given window. Messages can be structured objects, e.g. nested objects and arrays, can contain JavaScript values (strings, numbers, Date objects, etc), and can contain certain data objects such as File Blob, FileList, and ArrayBuffer objects.

    Objects listed in the transfer member of options are transferred, not just cloned, meaning that they are no longer usable on the sending side.

    A target origin can be specified using the targetOrigin member of options. If not provided, it defaults to "/". This default restricts the message to same-origin targets only.

    If the origin of the target window doesn't match the given target origin, the message is discarded, to avoid information leakage. To send the message to the target regardless of origin, set the target origin to "*".

    Throws a "DataCloneError" DOMException if transfer array contains duplicate objects or if message could not be cloned.

    Parameters

    • message: any
    • targetOrigin: string
    • Optional transfer: Transferable[]

    Returns void

  • Parameters

    Returns void

  • Returns void

  • Parameters

    • Optional message: string
    • Optional _default: string

    Returns null | string

  • Returns void

    Deprecated

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • width: number
    • height: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Cancels the document load.

    Returns void