Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Window

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

Hierarchy

  • EventTarget
  • AnimationFrameProvider
  • GlobalEventHandlers
  • WindowEventHandlers
  • WindowLocalStorage
  • WindowOrWorkerGlobalScope
  • WindowSessionStorage
  • MochaGlobals
    • Window

Indexable

[index: number]: Window

Index

Properties

Accessors

Methods

Properties

MonacoEnvironment?: Environment
after: HookFunction

Execute after running tests.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#after

afterEach: HookFunction

Execute after each test case.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#afterEach

before: HookFunction

Execute before running tests.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#before

beforeEach: HookFunction

Execute before each test case.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#beforeEach

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.

context: SuiteFunction

Describe a "suite" containing nested suites and tests.

  • Only available when invoked via the mocha CLI.
crossOriginIsolated: boolean
crypto: Crypto
customElements: CustomElementRegistry

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

describe: SuiteFunction

Describe a "suite" containing nested suites and tests.

  • Only available when invoked via the mocha CLI.
devicePixelRatio: number
document: Document
event: Event
deprecated
external: External
deprecated
frameElement: Element
frames: Window
history: History
indexedDB: IDBFactory
innerHeight: number
innerWidth: number
isSecureContext: boolean
it: TestFunction

Describes a test case.

  • Only available when invoked via the mocha CLI.
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: (ev: UIEvent) => any

Type declaration

    • (ev: UIEvent): any
    • Fires when the user aborts the download.

      Parameters

      • ev: UIEvent

        The event.

      Returns any

onafterprint: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

onanimationcancel: (ev: AnimationEvent) => any

Type declaration

    • (ev: AnimationEvent): any
    • Parameters

      • ev: AnimationEvent

      Returns any

onanimationend: (ev: AnimationEvent) => any

Type declaration

    • (ev: AnimationEvent): any
    • Parameters

      • ev: AnimationEvent

      Returns any

onanimationiteration: (ev: AnimationEvent) => any

Type declaration

    • (ev: AnimationEvent): any
    • Parameters

      • ev: AnimationEvent

      Returns any

onanimationstart: (ev: AnimationEvent) => any

Type declaration

    • (ev: AnimationEvent): any
    • Parameters

      • ev: AnimationEvent

      Returns any

onauxclick: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Parameters

      • ev: MouseEvent

      Returns any

onbeforeprint: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

onbeforeunload: (ev: BeforeUnloadEvent) => any

Type declaration

    • (ev: BeforeUnloadEvent): any
    • Parameters

      • ev: BeforeUnloadEvent

      Returns any

onblur: (ev: FocusEvent) => any

Type declaration

    • (ev: FocusEvent): any
    • Fires when the object loses the input focus.

      Parameters

      • ev: FocusEvent

        The focus event.

      Returns any

oncanplay: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when playback is possible, but would require further buffering.

      Parameters

      • ev: Event

        The event.

      Returns any

oncanplaythrough: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

onchange: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Fires when the contents of the object or selection have changed.

      Parameters

      • ev: Event

        The event.

      Returns any

onclick: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Fires when the user clicks the left mouse button on the object

      Parameters

      • ev: MouseEvent

        The mouse event.

      Returns any

onclose: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

oncontextmenu: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Fires when the user clicks the right mouse button in the client area, opening the context menu.

      Parameters

      • ev: MouseEvent

        The mouse event.

      Returns any

oncuechange: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

ondblclick: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Fires when the user double-clicks the object.

      Parameters

      • ev: MouseEvent

        The mouse event.

      Returns any

ondevicemotion: (ev: DeviceMotionEvent) => any

Type declaration

    • (ev: DeviceMotionEvent): any
    • Available only in secure contexts.

      Parameters

      • ev: DeviceMotionEvent

      Returns any

ondeviceorientation: (ev: DeviceOrientationEvent) => any

Type declaration

    • (ev: DeviceOrientationEvent): any
    • Available only in secure contexts.

      Parameters

      • ev: DeviceOrientationEvent

      Returns any

ondrag: (ev: DragEvent) => any

Type declaration

    • (ev: DragEvent): any
    • Fires on the source object continuously during a drag operation.

      Parameters

      • ev: DragEvent

        The event.

      Returns any

ondragend: (ev: DragEvent) => any

Type declaration

    • (ev: DragEvent): any
    • Fires on the source object when the user releases the mouse at the close of a drag operation.

      Parameters

      • ev: DragEvent

        The event.

      Returns any

ondragenter: (ev: DragEvent) => any

Type declaration

    • (ev: DragEvent): any
    • Fires on the target element when the user drags the object to a valid drop target.

      Parameters

      • ev: DragEvent

        The drag event.

      Returns any

ondragleave: (ev: DragEvent) => any

Type declaration

    • (ev: DragEvent): any
    • Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

      Parameters

      • ev: DragEvent

        The drag event.

      Returns any

ondragover: (ev: DragEvent) => any

Type declaration

    • (ev: DragEvent): any
    • Fires on the target element continuously while the user drags the object over a valid drop target.

      Parameters

      • ev: DragEvent

        The event.

      Returns any

ondragstart: (ev: DragEvent) => any

Type declaration

    • (ev: DragEvent): any
    • Fires on the source object when the user starts to drag a text selection or selected object.

      Parameters

      • ev: DragEvent

        The event.

      Returns any

ondrop: (ev: DragEvent) => any

Type declaration

    • (ev: DragEvent): any
    • Parameters

      • ev: DragEvent

      Returns any

ondurationchange: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the duration attribute is updated.

      Parameters

      • ev: Event

        The event.

      Returns any

onemptied: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the media element is reset to its initial state.

      Parameters

      • ev: Event

        The event.

      Returns any

onended: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the end of playback is reached.

      Parameters

      • ev: Event

        The event

      Returns any

onerror: OnErrorEventHandlerNonNull

Fires when an error occurs during object loading.

param ev

The event.

onfocus: (ev: FocusEvent) => any

Type declaration

    • (ev: FocusEvent): any
    • Fires when the object receives focus.

      Parameters

      • ev: FocusEvent

        The event.

      Returns any

onformdata: (ev: FormDataEvent) => any

Type declaration

    • (ev: FormDataEvent): any
    • Parameters

      • ev: FormDataEvent

      Returns any

ongamepadconnected: (ev: GamepadEvent) => any

Type declaration

    • (ev: GamepadEvent): any
    • Parameters

      • ev: GamepadEvent

      Returns any

ongamepaddisconnected: (ev: GamepadEvent) => any

Type declaration

    • (ev: GamepadEvent): any
    • Parameters

      • ev: GamepadEvent

      Returns any

ongotpointercapture: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onhashchange: (ev: HashChangeEvent) => any

Type declaration

    • (ev: HashChangeEvent): any
    • Parameters

      • ev: HashChangeEvent

      Returns any

oninput: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

oninvalid: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

onkeydown: (ev: KeyboardEvent) => any

Type declaration

    • (ev: KeyboardEvent): any
    • Fires when the user presses a key.

      Parameters

      • ev: KeyboardEvent

        The keyboard event

      Returns any

onkeypress: (ev: KeyboardEvent) => any

Type declaration

    • (ev: KeyboardEvent): any
    • Fires when the user presses an alphanumeric key.

      deprecated

      Parameters

      • ev: KeyboardEvent

        The event.

      Returns any

onkeyup: (ev: KeyboardEvent) => any

Type declaration

    • (ev: KeyboardEvent): any
    • Fires when the user releases a key.

      Parameters

      • ev: KeyboardEvent

        The keyboard event

      Returns any

onlanguagechange: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

onload: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Fires immediately after the browser loads the object.

      Parameters

      • ev: Event

        The event.

      Returns any

onloadeddata: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when media data is loaded at the current playback position.

      Parameters

      • ev: Event

        The event.

      Returns any

onloadedmetadata: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the duration and dimensions of the media have been determined.

      Parameters

      • ev: Event

        The event.

      Returns any

onloadstart: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when Internet Explorer begins looking for media data.

      Parameters

      • ev: Event

        The event.

      Returns any

onlostpointercapture: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onmessage: (ev: MessageEvent<any>) => any

Type declaration

    • (ev: MessageEvent<any>): any
    • Parameters

      • ev: MessageEvent<any>

      Returns any

onmessageerror: (ev: MessageEvent<any>) => any

Type declaration

    • (ev: MessageEvent<any>): any
    • Parameters

      • ev: MessageEvent<any>

      Returns any

onmousedown: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Fires when the user clicks the object with either mouse button.

      Parameters

      • ev: MouseEvent

        The mouse event.

      Returns any

onmouseenter: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Parameters

      • ev: MouseEvent

      Returns any

onmouseleave: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Parameters

      • ev: MouseEvent

      Returns any

onmousemove: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Fires when the user moves the mouse over the object.

      Parameters

      • ev: MouseEvent

        The mouse event.

      Returns any

onmouseout: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Fires when the user moves the mouse pointer outside the boundaries of the object.

      Parameters

      • ev: MouseEvent

        The mouse event.

      Returns any

onmouseover: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Fires when the user moves the mouse pointer into the object.

      Parameters

      • ev: MouseEvent

        The mouse event.

      Returns any

onmouseup: (ev: MouseEvent) => any

Type declaration

    • (ev: MouseEvent): any
    • Fires when the user releases a mouse button while the mouse is over the object.

      Parameters

      • ev: MouseEvent

        The mouse event.

      Returns any

onoffline: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

ononline: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

onorientationchange: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • deprecated

      Parameters

      • ev: Event

      Returns any

onpagehide: (ev: PageTransitionEvent) => any

Type declaration

    • (ev: PageTransitionEvent): any
    • Parameters

      • ev: PageTransitionEvent

      Returns any

onpageshow: (ev: PageTransitionEvent) => any

Type declaration

    • (ev: PageTransitionEvent): any
    • Parameters

      • ev: PageTransitionEvent

      Returns any

onpause: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when playback is paused.

      Parameters

      • ev: Event

        The event.

      Returns any

onplay: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the play method is requested.

      Parameters

      • ev: Event

        The event.

      Returns any

onplaying: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the audio or video has started playing.

      Parameters

      • ev: Event

        The event.

      Returns any

onpointercancel: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onpointerdown: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onpointerenter: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onpointerleave: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onpointermove: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onpointerout: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onpointerover: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onpointerup: (ev: PointerEvent) => any

Type declaration

    • (ev: PointerEvent): any
    • Parameters

      • ev: PointerEvent

      Returns any

onpopstate: (ev: PopStateEvent) => any

Type declaration

    • (ev: PopStateEvent): any
    • Parameters

      • ev: PopStateEvent

      Returns any

onprogress: (ev: ProgressEvent<EventTarget>) => any

Type declaration

    • (ev: ProgressEvent<EventTarget>): any
    • Occurs to indicate progress while downloading media data.

      Parameters

      • ev: ProgressEvent<EventTarget>

        The event.

      Returns any

onratechange: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the playback rate is increased or decreased.

      Parameters

      • ev: Event

        The event.

      Returns any

onrejectionhandled: (ev: PromiseRejectionEvent) => any

Type declaration

    • (ev: PromiseRejectionEvent): any
    • Parameters

      • ev: PromiseRejectionEvent

      Returns any

onreset: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Fires when the user resets a form.

      Parameters

      • ev: Event

        The event.

      Returns any

onresize: (ev: UIEvent) => any

Type declaration

    • (ev: UIEvent): any
    • Parameters

      • ev: UIEvent

      Returns any

onscroll: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Fires when the user repositions the scroll box in the scroll bar on the object.

      Parameters

      • ev: Event

        The event.

      Returns any

onseeked: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the seek operation ends.

      Parameters

      • ev: Event

        The event.

      Returns any

onseeking: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the current playback position is moved.

      Parameters

      • ev: Event

        The event.

      Returns any

onselect: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Fires when the current selection changes.

      Parameters

      • ev: Event

        The event.

      Returns any

onselectionchange: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

onselectstart: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

onstalled: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the download has stopped.

      Parameters

      • ev: Event

        The event.

      Returns any

onstorage: (ev: StorageEvent) => any

Type declaration

    • (ev: StorageEvent): any
    • Parameters

      • ev: StorageEvent

      Returns any

onsubmit: (ev: SubmitEvent) => any

Type declaration

    • (ev: SubmitEvent): any
    • Parameters

      • ev: SubmitEvent

      Returns any

onsuspend: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs if the load operation has been intentionally halted.

      Parameters

      • ev: Event

        The event.

      Returns any

ontimeupdate: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs to indicate the current playback position.

      Parameters

      • ev: Event

        The event.

      Returns any

ontoggle: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

ontouchcancel?: (ev: TouchEvent) => any

Type declaration

    • (ev: TouchEvent): any
    • Parameters

      • ev: TouchEvent

      Returns any

ontouchend?: (ev: TouchEvent) => any

Type declaration

    • (ev: TouchEvent): any
    • Parameters

      • ev: TouchEvent

      Returns any

ontouchmove?: (ev: TouchEvent) => any

Type declaration

    • (ev: TouchEvent): any
    • Parameters

      • ev: TouchEvent

      Returns any

ontouchstart?: (ev: TouchEvent) => any

Type declaration

    • (ev: TouchEvent): any
    • Parameters

      • ev: TouchEvent

      Returns any

ontransitioncancel: (ev: TransitionEvent) => any

Type declaration

    • (ev: TransitionEvent): any
    • Parameters

      • ev: TransitionEvent

      Returns any

ontransitionend: (ev: TransitionEvent) => any

Type declaration

    • (ev: TransitionEvent): any
    • Parameters

      • ev: TransitionEvent

      Returns any

ontransitionrun: (ev: TransitionEvent) => any

Type declaration

    • (ev: TransitionEvent): any
    • Parameters

      • ev: TransitionEvent

      Returns any

ontransitionstart: (ev: TransitionEvent) => any

Type declaration

    • (ev: TransitionEvent): any
    • Parameters

      • ev: TransitionEvent

      Returns any

onunhandledrejection: (ev: PromiseRejectionEvent) => any

Type declaration

    • (ev: PromiseRejectionEvent): any
    • Parameters

      • ev: PromiseRejectionEvent

      Returns any

onunload: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Parameters

      • ev: Event

      Returns any

onvolumechange: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when the volume is changed, or playback is muted or unmuted.

      Parameters

      • ev: Event

        The event.

      Returns any

onwaiting: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • Occurs when playback stops because the next frame of a video resource is not available.

      Parameters

      • ev: Event

        The event.

      Returns any

onwebkitanimationend: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • deprecated

      This is a legacy alias of onanimationend.

      Parameters

      • ev: Event

      Returns any

onwebkitanimationiteration: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • deprecated

      This is a legacy alias of onanimationiteration.

      Parameters

      • ev: Event

      Returns any

onwebkitanimationstart: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • deprecated

      This is a legacy alias of onanimationstart.

      Parameters

      • ev: Event

      Returns any

onwebkittransitionend: (ev: Event) => any

Type declaration

    • (ev: Event): any
    • deprecated

      This is a legacy alias of ontransitionend.

      Parameters

      • ev: Event

      Returns any

onwheel: (ev: WheelEvent) => any

Type declaration

    • (ev: WheelEvent): any
    • Parameters

      • ev: WheelEvent

      Returns any

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.

run: () => void

Type declaration

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
setup: HookFunction

Execute before each test case.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#beforeEach

specify: TestFunction

Describes a test case.

  • Only available when invoked via the mocha CLI.
speechSynthesis: SpeechSynthesis
status: string
deprecated
statusbar: BarProp

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

suite: SuiteFunction

Describe a "suite" containing nested suites and tests.

  • Only available when invoked via the mocha CLI.
suiteSetup: HookFunction

Execute before running tests.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#before

suiteTeardown: HookFunction

Execute after running tests.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#after

teardown: HookFunction

Execute after each test case.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#afterEach

test: TestFunction

Describes a test case.

  • Only available when invoked via the mocha CLI.
toolbar: BarProp

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

top: Window
visualViewport: VisualViewport
window: Window & typeof globalThis
xcontext: PendingSuiteFunction

Pending suite.

  • Only available when invoked via the mocha CLI.
xdescribe: PendingSuiteFunction

Pending suite.

  • Only available when invoked via the mocha CLI.
xit: PendingTestFunction

Describes a pending test case.

  • Only available when invoked via the mocha CLI.
xspecify: PendingTestFunction

Describes a pending test case.

  • Only available when invoked via the mocha CLI.

Accessors

  • get location(): Location
  • set location(href: string | Location): void
  • Returns Location

  • Parameters

    • href: string | Location

    Returns void

Methods

  • addEventListener<K>(type: K, listener: (ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
  • addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
  • Type parameters

    • K: keyof WindowEventMap

    Parameters

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

          • ev: WindowEventMap[K]

          Returns any

    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • alert(message?: any): void
  • Parameters

    • Optional message: any

    Returns void

  • atob(data: string): string
  • Parameters

    • data: string

    Returns string

  • blur(): void
  • Returns void

  • btoa(data: string): string
  • Parameters

    • data: string

    Returns string

  • cancelAnimationFrame(handle: number): void
  • Parameters

    • handle: number

    Returns void

  • cancelIdleCallback(handle: number): void
  • Parameters

    • handle: number

    Returns void

  • captureEvents(): void
  • deprecated

    Returns void

  • clearInterval(handle?: number): void
  • Parameters

    • Optional handle: number

    Returns void

  • clearTimeout(handle?: number): void
  • Parameters

    • Optional handle: number

    Returns void

  • close(): void
  • Closes the window.

    Returns void

  • confirm(message?: string): boolean
  • Parameters

    • Optional message: string

    Returns boolean

  • createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>
  • createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>
  • Parameters

    • image: ImageBitmapSource
    • Optional options: ImageBitmapOptions

    Returns Promise<ImageBitmap>

  • Parameters

    • image: ImageBitmapSource
    • sx: number
    • sy: number
    • sw: number
    • sh: number
    • Optional options: ImageBitmapOptions

    Returns Promise<ImageBitmap>

  • dispatchEvent(event: Event): 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

    • event: Event

    Returns boolean

  • fetch(input: RequestInfo, init?: RequestInit): Promise<Response>
  • Parameters

    • input: RequestInfo
    • Optional init: RequestInit

    Returns Promise<Response>

  • focus(): void
  • Moves the focus to the window's browsing context, if any.

    Returns void

  • getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration
  • Parameters

    • elt: Element
    • Optional pseudoElt: string

    Returns CSSStyleDeclaration

  • getSelection(): Selection
  • Returns Selection

  • matchMedia(query: string): MediaQueryList
  • Parameters

    • query: string

    Returns MediaQueryList

  • moveBy(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

  • moveTo(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

  • open(url?: string | URL, target?: string, features?: string): Window
  • Parameters

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

    Returns Window

  • postMessage(message: any, targetOrigin: string, transfer?: Transferable[]): void
  • postMessage(message: any, options?: WindowPostMessageOptions): void
  • 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

    • message: any
    • Optional options: WindowPostMessageOptions

    Returns void

  • print(): void
  • Returns void

  • prompt(message?: string, _default?: string): string
  • Parameters

    • Optional message: string
    • Optional _default: string

    Returns string

  • queueMicrotask(callback: VoidFunction): void
  • Parameters

    • callback: VoidFunction

    Returns void

  • releaseEvents(): void
  • deprecated

    Returns void

  • removeEventListener<K>(type: K, listener: (ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void
  • removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void
  • Type parameters

    • K: keyof WindowEventMap

    Parameters

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

          • ev: WindowEventMap[K]

          Returns any

    • Optional options: boolean | EventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

  • requestAnimationFrame(callback: FrameRequestCallback): number
  • Parameters

    • callback: FrameRequestCallback

    Returns number

  • requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number
  • Parameters

    • callback: IdleRequestCallback
    • Optional options: IdleRequestOptions

    Returns number

  • resizeBy(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

  • resizeTo(width: number, height: number): void
  • Parameters

    • width: number
    • height: number

    Returns void

  • scroll(options?: ScrollToOptions): void
  • scroll(x: number, y: number): void
  • Parameters

    • Optional options: ScrollToOptions

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • scrollBy(options?: ScrollToOptions): void
  • scrollBy(x: number, y: number): void
  • Parameters

    • Optional options: ScrollToOptions

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • scrollTo(options?: ScrollToOptions): void
  • scrollTo(x: number, y: number): void
  • Parameters

    • Optional options: ScrollToOptions

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number
  • Parameters

    • handler: TimerHandler
    • Optional timeout: number
    • Rest ...arguments: any[]

    Returns number

  • setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number
  • Parameters

    • handler: TimerHandler
    • Optional timeout: number
    • Rest ...arguments: any[]

    Returns number

  • stop(): void
  • Cancels the document load.

    Returns void