Global window type for dispatching and listening for WindowAppReadyEvent and WindowRegisterWalletEvent.

import { WalletEventsWindow } from '@wallet-standard/base';

declare const window: WalletEventsWindow;
// OR
(window as WalletEventsWindow)
interface WalletEventsWindow {
    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;
    location: Location;
    locationbar: BarProp;
    menubar: BarProp;
    name: string;
    navigator: Navigator;
    onabort: null | ((this: GlobalEventHandlers, ev: UIEvent) => any);
    onafterprint: null | ((this: WindowEventHandlers, ev: Event) => any);
    onanimationcancel: null | ((this: GlobalEventHandlers, ev: AnimationEvent) => any);
    onanimationend: null | ((this: GlobalEventHandlers, ev: AnimationEvent) => any);
    onanimationiteration: null | ((this: GlobalEventHandlers, ev: AnimationEvent) => any);
    onanimationstart: null | ((this: GlobalEventHandlers, ev: AnimationEvent) => any);
    onauxclick: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    onbeforeinput: null | ((this: GlobalEventHandlers, ev: InputEvent) => any);
    onbeforeprint: null | ((this: WindowEventHandlers, ev: Event) => any);
    onbeforetoggle: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onbeforeunload: null | ((this: WindowEventHandlers, ev: BeforeUnloadEvent) => any);
    onblur: null | ((this: GlobalEventHandlers, ev: FocusEvent) => any);
    oncancel: null | ((this: GlobalEventHandlers, ev: Event) => any);
    oncanplay: null | ((this: GlobalEventHandlers, ev: Event) => any);
    oncanplaythrough: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onchange: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onclick: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    onclose: null | ((this: GlobalEventHandlers, ev: Event) => any);
    oncontextmenu: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    oncopy: null | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any);
    oncuechange: null | ((this: GlobalEventHandlers, ev: Event) => any);
    oncut: null | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any);
    ondblclick: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    ondevicemotion: null | ((this: Window, ev: DeviceMotionEvent) => any);
    ondeviceorientation: null | ((this: Window, ev: DeviceOrientationEvent) => any);
    ondeviceorientationabsolute: null | ((this: Window, ev: DeviceOrientationEvent) => any);
    ondrag: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
    ondragend: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
    ondragenter: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
    ondragleave: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
    ondragover: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
    ondragstart: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
    ondrop: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
    ondurationchange: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onemptied: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onended: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onerror: OnErrorEventHandler;
    onfocus: null | ((this: GlobalEventHandlers, ev: FocusEvent) => any);
    onformdata: null | ((this: GlobalEventHandlers, ev: FormDataEvent) => any);
    ongamepadconnected: null | ((this: WindowEventHandlers, ev: GamepadEvent) => any);
    ongamepaddisconnected: null | ((this: WindowEventHandlers, ev: GamepadEvent) => any);
    ongotpointercapture: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onhashchange: null | ((this: WindowEventHandlers, ev: HashChangeEvent) => any);
    oninput: null | ((this: GlobalEventHandlers, ev: Event) => any);
    oninvalid: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onkeydown: null | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any);
    onkeypress: null | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any);
    onkeyup: null | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any);
    onlanguagechange: null | ((this: WindowEventHandlers, ev: Event) => any);
    onload: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onloadeddata: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onloadedmetadata: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onloadstart: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onlostpointercapture: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onmessage: null | ((this: WindowEventHandlers, ev: MessageEvent<any>) => any);
    onmessageerror: null | ((this: WindowEventHandlers, ev: MessageEvent<any>) => any);
    onmousedown: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    onmouseenter: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    onmouseleave: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    onmousemove: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    onmouseout: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    onmouseover: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    onmouseup: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
    onoffline: null | ((this: WindowEventHandlers, ev: Event) => any);
    ononline: null | ((this: WindowEventHandlers, ev: Event) => any);
    onorientationchange: null | ((this: Window, ev: Event) => any);
    onpagehide: null | ((this: WindowEventHandlers, ev: PageTransitionEvent) => any);
    onpageshow: null | ((this: WindowEventHandlers, ev: PageTransitionEvent) => any);
    onpaste: null | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any);
    onpause: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onplay: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onplaying: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onpointercancel: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onpointerdown: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onpointerenter: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onpointerleave: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onpointermove: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onpointerout: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onpointerover: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onpointerup: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
    onpopstate: null | ((this: WindowEventHandlers, ev: PopStateEvent) => any);
    onprogress: null | ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any);
    onratechange: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onrejectionhandled: null | ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any);
    onreset: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onresize: null | ((this: GlobalEventHandlers, ev: UIEvent) => any);
    onscroll: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onscrollend: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onsecuritypolicyviolation: null | ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any);
    onseeked: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onseeking: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onselect: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onselectionchange: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onselectstart: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onslotchange: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onstalled: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onstorage: null | ((this: WindowEventHandlers, ev: StorageEvent) => any);
    onsubmit: null | ((this: GlobalEventHandlers, ev: SubmitEvent) => any);
    onsuspend: null | ((this: GlobalEventHandlers, ev: Event) => any);
    ontimeupdate: null | ((this: GlobalEventHandlers, ev: Event) => any);
    ontoggle: null | ((this: GlobalEventHandlers, ev: Event) => any);
    ontouchcancel?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any);
    ontouchend?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any);
    ontouchmove?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any);
    ontouchstart?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any);
    ontransitioncancel: null | ((this: GlobalEventHandlers, ev: TransitionEvent) => any);
    ontransitionend: null | ((this: GlobalEventHandlers, ev: TransitionEvent) => any);
    ontransitionrun: null | ((this: GlobalEventHandlers, ev: TransitionEvent) => any);
    ontransitionstart: null | ((this: GlobalEventHandlers, ev: TransitionEvent) => any);
    onunhandledrejection: null | ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any);
    onunload: null | ((this: WindowEventHandlers, ev: Event) => any);
    onvolumechange: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onwaiting: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onwebkitanimationend: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onwebkitanimationiteration: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onwebkitanimationstart: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onwebkittransitionend: null | ((this: GlobalEventHandlers, ev: Event) => any);
    onwheel: null | ((this: GlobalEventHandlers, ev: WheelEvent) => 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;
    addEventListener(type: "wallet-standard:app-ready", listener: ((event: WindowAppReadyEvent) => void)): void;
    addEventListener(type: "wallet-standard:register-wallet", listener: ((event: WindowRegisterWalletEvent) => void)): void;
    alert(message?: any): void;
    atob(data: string): string;
    blur(): void;
    btoa(data: string): string;
    cancelAnimationFrame(handle: number): void;
    cancelIdleCallback(handle: number): void;
    captureEvents(): void;
    clearInterval(id: undefined | number): void;
    clearTimeout(id: undefined | number): void;
    close(): void;
    confirm(message?: string): boolean;
    createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
    createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
    dispatchEvent(event: WindowAppReadyEvent): void;
    dispatchEvent(event: WindowRegisterWalletEvent): void;
    fetch(input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
    focus(): void;
    getComputedStyle(elt: Element, pseudoElt?: null | string): CSSStyleDeclaration;
    getSelection(): null | Selection;
    matchMedia(query: string): MediaQueryList;
    moveBy(x: number, y: number): void;
    moveTo(x: number, y: number): void;
    open(url?: string | URL, target?: string, features?: string): null | Window;
    postMessage(message: any, targetOrigin: string, transfer?: Transferable[]): void;
    postMessage(message: any, options?: WindowPostMessageOptions): void;
    print(): void;
    prompt(message?: string, _default?: string): null | string;
    queueMicrotask(callback: VoidFunction): void;
    releaseEvents(): void;
    removeEventListener<K>(type: K, listener: ((this: Window, ev: WindowEventMap[K]) => any), options?: boolean | EventListenerOptions): void;
    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
    reportError(e: any): void;
    requestAnimationFrame(callback: FrameRequestCallback): number;
    requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number;
    resizeBy(x: number, y: number): void;
    resizeTo(width: number, height: number): void;
    scroll(options?: ScrollToOptions): void;
    scroll(x: number, y: number): void;
    scrollBy(options?: ScrollToOptions): void;
    scrollBy(x: number, y: number): void;
    scrollTo(options?: ScrollToOptions): void;
    scrollTo(x: number, y: number): void;
    setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
    setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
    stop(): void;
    structuredClone<T>(value: T, options?: StructuredSerializeOptions): T;
}

Hierarchy

  • Omit<Window, "addEventListener" | "dispatchEvent">
    • WalletEventsWindow

Properties

caches clientInformation closed crossOriginIsolated crypto customElements devicePixelRatio document event external frameElement frames history indexedDB innerHeight innerWidth isSecureContext length localStorage location locationbar menubar name navigator onabort onafterprint onanimationcancel onanimationend onanimationiteration onanimationstart onauxclick onbeforeinput onbeforeprint onbeforetoggle onbeforeunload onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncopy oncuechange oncut ondblclick ondevicemotion ondeviceorientation ondeviceorientationabsolute 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 onpaste onpause onplay onplaying onpointercancel onpointerdown onpointerenter onpointerleave onpointermove onpointerout onpointerover onpointerup onpopstate onprogress onratechange onrejectionhandled onreset onresize onscroll onscrollend 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

Methods

Properties

caches: CacheStorage

Available only in secure contexts.

MDN Reference

clientInformation: Navigator

This is a legacy alias of navigator.

MDN Reference

closed: boolean

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

MDN Reference

crossOriginIsolated: boolean
crypto: Crypto
customElements: CustomElementRegistry

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

MDN Reference

devicePixelRatio: number
document: Document
event: undefined | Event

MDN Reference

external: External

MDN Reference

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

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

MDN Reference

menubar: BarProp

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

MDN Reference

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

Fires when the user aborts the download.

The event.

MDN Reference

onafterprint: null | ((this: WindowEventHandlers, ev: Event) => any)
onanimationcancel: null | ((this: GlobalEventHandlers, ev: AnimationEvent) => any)
onanimationend: null | ((this: GlobalEventHandlers, ev: AnimationEvent) => any)
onanimationiteration: null | ((this: GlobalEventHandlers, ev: AnimationEvent) => any)
onanimationstart: null | ((this: GlobalEventHandlers, ev: AnimationEvent) => any)
onauxclick: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any)
onbeforeinput: null | ((this: GlobalEventHandlers, ev: InputEvent) => any)
onbeforeprint: null | ((this: WindowEventHandlers, ev: Event) => any)
onbeforetoggle: null | ((this: GlobalEventHandlers, ev: Event) => any)
onbeforeunload: null | ((this: WindowEventHandlers, ev: BeforeUnloadEvent) => any)
onblur: null | ((this: GlobalEventHandlers, ev: FocusEvent) => any)

Fires when the object loses the input focus.

The focus event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The mouse event.

MDN Reference

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

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

The mouse event.

MDN Reference

oncopy: null | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any)
oncuechange: null | ((this: GlobalEventHandlers, ev: Event) => any)
oncut: null | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any)
ondblclick: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any)

Fires when the user double-clicks the object.

The mouse event.

MDN Reference

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

Available only in secure contexts.

MDN Reference

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

Available only in secure contexts.

MDN Reference

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

Available only in secure contexts.

MDN Reference

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

Fires on the source object continuously during a drag operation.

The event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The drag event.

MDN Reference

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

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

The drag event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The event.

MDN Reference

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

Occurs when the duration attribute is updated.

The event.

MDN Reference

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

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

The event.

MDN Reference

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

Occurs when the end of playback is reached.

The event

MDN Reference

onerror: OnErrorEventHandler

Fires when an error occurs during object loading.

The event.

MDN Reference

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

Fires when the object receives focus.

The event.

MDN Reference

onformdata: null | ((this: GlobalEventHandlers, ev: FormDataEvent) => any)
ongamepadconnected: null | ((this: WindowEventHandlers, ev: GamepadEvent) => any)
ongamepaddisconnected: null | ((this: WindowEventHandlers, ev: GamepadEvent) => any)
ongotpointercapture: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onhashchange: null | ((this: WindowEventHandlers, ev: HashChangeEvent) => any)
oninput: null | ((this: GlobalEventHandlers, ev: Event) => any)
oninvalid: null | ((this: GlobalEventHandlers, ev: Event) => any)
onkeydown: null | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any)

Fires when the user presses a key.

The keyboard event

MDN Reference

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

Fires when the user presses an alphanumeric key.

The event.

MDN Reference

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

Fires when the user releases a key.

The keyboard event

MDN Reference

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

Fires immediately after the browser loads the object.

The event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The event.

MDN Reference

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

Occurs when Internet Explorer begins looking for media data.

The event.

MDN Reference

onlostpointercapture: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onmessage: null | ((this: WindowEventHandlers, ev: MessageEvent<any>) => any)
onmessageerror: null | ((this: WindowEventHandlers, ev: MessageEvent<any>) => any)
onmousedown: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any)

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

The mouse event.

MDN Reference

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

Fires when the user moves the mouse over the object.

The mouse event.

MDN Reference

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

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

The mouse event.

MDN Reference

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

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

The mouse event.

MDN Reference

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

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

The mouse event.

MDN Reference

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

MDN Reference

onpagehide: null | ((this: WindowEventHandlers, ev: PageTransitionEvent) => any)
onpageshow: null | ((this: WindowEventHandlers, ev: PageTransitionEvent) => any)
onpaste: null | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any)
onpause: null | ((this: GlobalEventHandlers, ev: Event) => any)

Occurs when playback is paused.

The event.

MDN Reference

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

Occurs when the play method is requested.

The event.

MDN Reference

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

Occurs when the audio or video has started playing.

The event.

MDN Reference

onpointercancel: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onpointerdown: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onpointerenter: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onpointerleave: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onpointermove: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onpointerout: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onpointerover: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onpointerup: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any)
onpopstate: null | ((this: WindowEventHandlers, ev: PopStateEvent) => any)
onprogress: null | ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any)

Occurs to indicate progress while downloading media data.

The event.

MDN Reference

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

Occurs when the playback rate is increased or decreased.

The event.

MDN Reference

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

Fires when the user resets a form.

The event.

MDN Reference

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

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

The event.

MDN Reference

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

Occurs when the seek operation ends.

The event.

MDN Reference

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

Occurs when the current playback position is moved.

The event.

MDN Reference

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

Fires when the current selection changes.

The event.

MDN Reference

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

Occurs when the download has stopped.

The event.

MDN Reference

onstorage: null | ((this: WindowEventHandlers, ev: StorageEvent) => any)
onsubmit: null | ((this: GlobalEventHandlers, ev: SubmitEvent) => any)
onsuspend: null | ((this: GlobalEventHandlers, ev: Event) => any)

Occurs if the load operation has been intentionally halted.

The event.

MDN Reference

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

Occurs to indicate the current playback position.

The event.

MDN Reference

ontoggle: null | ((this: GlobalEventHandlers, ev: Event) => any)
ontouchcancel?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any)
ontouchend?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any)
ontouchmove?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any)
ontouchstart?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any)
ontransitioncancel: null | ((this: GlobalEventHandlers, ev: TransitionEvent) => any)
ontransitionend: null | ((this: GlobalEventHandlers, ev: TransitionEvent) => any)
ontransitionrun: null | ((this: GlobalEventHandlers, ev: TransitionEvent) => any)
ontransitionstart: null | ((this: GlobalEventHandlers, ev: TransitionEvent) => any)
onunhandledrejection: null | ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any)
onunload: null | ((this: WindowEventHandlers, ev: Event) => any)

MDN Reference

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

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

The event.

MDN Reference

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

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

The event.

MDN Reference

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

This is a legacy alias of onanimationend.

MDN Reference

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

This is a legacy alias of onanimationiteration.

MDN Reference

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

This is a legacy alias of onanimationstart.

MDN Reference

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

This is a legacy alias of ontransitionend.

MDN Reference

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

MDN Reference

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

This is a legacy alias of scrollX.

MDN Reference

pageYOffset: number

This is a legacy alias of scrollY.

MDN Reference

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.

MDN Reference

performance: Performance
personalbar: BarProp

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

MDN Reference

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.

MDN Reference

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

MDN Reference

statusbar: BarProp

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

MDN Reference

toolbar: BarProp

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

MDN Reference

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

Methods

  • Add a listener for WindowAppReadyEvent.

    Parameters

    Returns void

  • Add a listener for WindowRegisterWalletEvent.

    Parameters

    Returns void

  • Parameters

    • Optionalmessage: any

    Returns void

  • Parameters

    • data: string

    Returns string

  • Returns void

    MDN Reference

  • Parameters

    • data: string

    Returns string

  • Parameters

    • handle: number

    Returns void

  • Parameters

    • handle: number

    Returns void

  • Returns void

    MDN Reference

  • Parameters

    • id: undefined | number

    Returns void

  • Parameters

    • id: undefined | number

    Returns void

  • Closes the window.

    MDN Reference

    Returns void

  • Parameters

    • Optionalmessage: string

    Returns boolean

  • Parameters

    • image: ImageBitmapSource
    • Optionaloptions: ImageBitmapOptions

    Returns Promise<ImageBitmap>

  • Parameters

    • image: ImageBitmapSource
    • sx: number
    • sy: number
    • sw: number
    • sh: number
    • Optionaloptions: ImageBitmapOptions

    Returns Promise<ImageBitmap>

  • Dispatch a WindowAppReadyEvent.

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • input: URL | RequestInfo
    • Optionalinit: RequestInit

    Returns Promise<Response>

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

    MDN Reference

    Returns void

  • Parameters

    • elt: Element
    • OptionalpseudoElt: null | string

    Returns CSSStyleDeclaration

  • Returns null | Selection

  • Parameters

    • query: string

    Returns MediaQueryList

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • Optionalurl: string | URL
    • Optionaltarget: string
    • Optionalfeatures: 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.

    MDN Reference

    Parameters

    • message: any
    • targetOrigin: string
    • Optionaltransfer: Transferable[]

    Returns void

  • Parameters

    • message: any
    • Optionaloptions: WindowPostMessageOptions

    Returns void

  • Returns void

  • Parameters

    • Optionalmessage: string
    • Optional_default: string

    Returns null | string

  • Parameters

    • callback: VoidFunction

    Returns void

  • Returns void

    MDN Reference

  • Removes the event listener in target's event listener list with the same type, callback, and options.

    MDN Reference

    Type Parameters

    • K extends keyof WindowEventMap

    Parameters

    • type: K
    • listener: ((this: Window, ev: WindowEventMap[K]) => any)
        • (this, ev): any
        • Parameters

          • this: Window
          • ev: WindowEventMap[K]

          Returns any

    • Optionaloptions: boolean | EventListenerOptions

    Returns void

  • Removes the event listener in target's event listener list with the same type, callback, and options.

    MDN Reference

    Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optionaloptions: boolean | EventListenerOptions

    Returns void

  • Parameters

    • e: any

    Returns void

  • Parameters

    • callback: FrameRequestCallback

    Returns number

  • Parameters

    • callback: IdleRequestCallback
    • Optionaloptions: IdleRequestOptions

    Returns number

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • width: number
    • height: number

    Returns void

  • Parameters

    • Optionaloptions: ScrollToOptions

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • Optionaloptions: ScrollToOptions

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • Optionaloptions: ScrollToOptions

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • handler: TimerHandler
    • Optionaltimeout: number
    • Rest...arguments: any[]

    Returns number

  • Parameters

    • handler: TimerHandler
    • Optionaltimeout: number
    • Rest...arguments: any[]

    Returns number

  • Cancels the document load.

    MDN Reference

    Returns void

  • Type Parameters

    • T = any

    Parameters

    • value: T
    • Optionaloptions: StructuredSerializeOptions

    Returns T