Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Window

Package version

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

Hierarchy

Indexable

[index: number]: Window

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

Index

Properties

Methods

Properties

EventTarget

EventTarget: { constructor: any; prototype: EventTarget }

Type declaration

  • constructor: function
    • Returns EventTarget

  • prototype: EventTarget

applicationCache

applicationCache: ApplicationCache

caches

caches: CacheStorage

clientInformation

clientInformation: Navigator

closed

closed: boolean

console

console: Console

crypto

crypto: Crypto

customElements

customElements: CustomElementRegistry

defaultStatus

defaultStatus: string

devicePixelRatio

devicePixelRatio: number

doNotTrack

doNotTrack: string

document

document: Document

event

event: Event | undefined
deprecated

external

external: External
deprecated

frameElement

frameElement: Element

frames

frames: Window

history

history: History

indexedDB

indexedDB: IDBFactory

innerHeight

innerHeight: number

innerWidth

innerWidth: number

isSecureContext

isSecureContext: boolean

length

length: number

localStorage

localStorage: Storage

location

location: Location

locationbar

locationbar: BarProp

menubar

menubar: BarProp

msContentScript

msContentScript: ExtensionScriptApis

name

name: string

navigator

navigator: Navigator

offscreenBuffering

offscreenBuffering: string | boolean

onabort

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

Fires when the user aborts the download.

param

The event.

onafterprint

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

onanimationcancel

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

onanimationend

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

onanimationiteration

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

onanimationstart

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

onauxclick

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

onbeforeprint

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

onbeforeunload

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

onblur

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

Fires when the object loses the input focus.

param

The focus event.

oncancel

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

oncanplay

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

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

param

The event.

oncanplaythrough

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

onchange

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

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

param

The event.

onclick

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

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

param

The mouse event.

onclose

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

oncompassneedscalibration

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

oncontextmenu

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

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

param

The mouse event.

oncuechange

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

ondblclick

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

Fires when the user double-clicks the object.

param

The mouse event.

ondevicelight

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

ondevicemotion

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

ondeviceorientation

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

ondeviceorientationabsolute

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

ondrag

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

Fires on the source object continuously during a drag operation.

param

The event.

ondragend

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

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

param

The event.

ondragenter

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

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

param

The drag event.

ondragexit

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

ondragleave

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

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

param

The drag event.

ondragover

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

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

param

The event.

ondragstart

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

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

param

The event.

ondrop

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

ondurationchange

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

Occurs when the duration attribute is updated.

param

The event.

onemptied

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

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

param

The event.

onended

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

Occurs when the end of playback is reached.

param

The event

onerror

Fires when an error occurs during object loading.

param

The event.

onfocus

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

Fires when the object receives focus.

param

The event.

ongotpointercapture

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

onhashchange

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

oninput

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

oninvalid

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

onkeydown

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

Fires when the user presses a key.

param

The keyboard event

onkeypress

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

Fires when the user presses an alphanumeric key.

param

The event.

onkeyup

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

Fires when the user releases a key.

param

The keyboard event

onlanguagechange

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

onload

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

Fires immediately after the browser loads the object.

param

The event.

onloadeddata

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

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

param

The event.

onloadedmetadata

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

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

param

The event.

onloadend

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

onloadstart

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

Occurs when Internet Explorer begins looking for media data.

param

The event.

onlostpointercapture

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

onmessage

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

onmessageerror

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

onmousedown

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

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

param

The mouse event.

onmouseenter

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

onmouseleave

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

onmousemove

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

Fires when the user moves the mouse over the object.

param

The mouse event.

onmouseout

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

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

param

The mouse event.

onmouseover

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

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

param

The mouse event.

onmouseup

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

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

param

The mouse event.

onmousewheel

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

onmsgesturechange

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

onmsgesturedoubletap

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

onmsgestureend

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

onmsgesturehold

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

onmsgesturestart

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

onmsgesturetap

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

onmsinertiastart

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

onmspointercancel

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

onmspointerdown

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

onmspointerenter

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

onmspointerleave

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

onmspointermove

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

onmspointerout

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

onmspointerover

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

onmspointerup

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

onoffline

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

ononline

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

onorientationchange

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

onpagehide

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

onpageshow

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

onpause

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

Occurs when playback is paused.

param

The event.

onplay

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

Occurs when the play method is requested.

param

The event.

onplaying

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

Occurs when the audio or video has started playing.

param

The event.

onpointercancel

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

onpointerdown

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

onpointerenter

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

onpointerleave

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

onpointermove

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

onpointerout

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

onpointerover

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

onpointerup

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

onpopstate

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

onprogress

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

Occurs to indicate progress while downloading media data.

param

The event.

onratechange

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

Occurs when the playback rate is increased or decreased.

param

The event.

onreadystatechange

onreadystatechange: ((this: Window, ev: ProgressEvent<Window>) => any) | null

onrejectionhandled

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

onreset

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

Fires when the user resets a form.

param

The event.

onresize

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

onscroll

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

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

param

The event.

onsecuritypolicyviolation

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

onseeked

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

Occurs when the seek operation ends.

param

The event.

onseeking

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

Occurs when the current playback position is moved.

param

The event.

onselect

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

Fires when the current selection changes.

param

The event.

onselectionchange

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

onselectstart

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

onstalled

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

Occurs when the download has stopped.

param

The event.

onstorage

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

onsubmit

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

onsuspend

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

Occurs if the load operation has been intentionally halted.

param

The event.

ontimeupdate

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

Occurs to indicate the current playback position.

param

The event.

ontoggle

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

ontouchcancel

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

ontouchend

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

ontouchmove

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

ontouchstart

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

ontransitioncancel

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

ontransitionend

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

ontransitionrun

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

ontransitionstart

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

onunhandledrejection

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

onunload

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

onvolumechange

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

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

param

The event.

onvrdisplayactivate

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

onvrdisplayblur

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

onvrdisplayconnect

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

onvrdisplaydeactivate

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

onvrdisplaydisconnect

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

onvrdisplayfocus

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

onvrdisplaypointerrestricted

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

onvrdisplaypointerunrestricted

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

onvrdisplaypresentchange

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

onwaiting

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

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

param

The event.

onwheel

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

opener

opener: any

orientation

orientation: string | number
deprecated

origin

origin: string

outerHeight

outerHeight: number

outerWidth

outerWidth: number

pageXOffset

pageXOffset: number

pageYOffset

pageYOffset: number

parent

parent: Window

performance

performance: Performance

personalbar

personalbar: BarProp

screen

screen: Screen

screenLeft

screenLeft: number

screenTop

screenTop: number

screenX

screenX: number

screenY

screenY: number

scrollX

scrollX: number

scrollY

scrollY: number

scrollbars

scrollbars: BarProp

self

self: Window & typeof globalThis

sessionStorage

sessionStorage: Storage

speechSynthesis

speechSynthesis: SpeechSynthesis

status

status: string

statusbar

statusbar: BarProp

styleMedia

styleMedia: StyleMedia

toolbar

toolbar: BarProp

top

top: Window

window

window: Window & typeof globalThis

Methods

addEventListener

alert

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

    • Optional message: any

    Returns void

atob

  • atob(encodedString: string): string
  • Parameters

    • encodedString: string

    Returns string

blur

  • blur(): void
  • Returns void

btoa

  • btoa(rawString: string): string
  • Parameters

    • rawString: string

    Returns string

cancelAnimationFrame

  • cancelAnimationFrame(handle: number): void
  • Parameters

    • handle: number

    Returns void

captureEvents

  • captureEvents(): void
  • deprecated

    Returns void

clearInterval

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

    • Optional handle: undefined | number

    Returns void

clearTimeout

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

    • Optional handle: undefined | number

    Returns void

close

  • close(): void
  • Returns void

confirm

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

    • Optional message: undefined | string

    Returns boolean

createImageBitmap

departFocus

  • Parameters

    Returns void

dispatchEvent

  • 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

    Returns boolean

fetch

focus

  • focus(): void
  • Returns void

getComputedStyle

  • Parameters

    • elt: Element
    • Optional pseudoElt: string | null

    Returns CSSStyleDeclaration

getMatchedCSSRules

  • Parameters

    • elt: Element
    • Optional pseudoElt: string | null

    Returns CSSRuleList

getSelection

  • Returns Selection | null

matchMedia

  • Parameters

    • query: string

    Returns MediaQueryList

moveBy

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

    • x: number
    • y: number

    Returns void

moveTo

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

    • x: number
    • y: number

    Returns void

msWriteProfilerMark

  • msWriteProfilerMark(profilerMarkName: string): void
  • Parameters

    • profilerMarkName: string

    Returns void

open

  • open(url?: undefined | string, target?: undefined | string, features?: undefined | string, replace?: undefined | false | true): Window | null
  • Parameters

    • Optional url: undefined | string
    • Optional target: undefined | string
    • Optional features: undefined | string
    • Optional replace: undefined | false | true

    Returns Window | null

postMessage

  • postMessage(message: any, targetOrigin: string, transfer?: Transferable[]): void
  • Parameters

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

    Returns void

print

  • print(): void
  • Returns void

prompt

  • prompt(message?: undefined | string, _default?: undefined | string): string | null
  • Parameters

    • Optional message: undefined | string
    • Optional _default: undefined | string

    Returns string | null

queueMicrotask

  • queueMicrotask(callback: Function): void
  • Parameters

    • callback: Function

    Returns void

releaseEvents

  • releaseEvents(): void
  • deprecated

    Returns void

removeEventListener

requestAnimationFrame

resizeBy

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

    • x: number
    • y: number

    Returns void

resizeTo

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

    • x: number
    • y: number

    Returns void

scroll

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

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

scrollBy

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

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

scrollTo

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

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

setInterval

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

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

    Returns number

setTimeout

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

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

    Returns number

stop

  • stop(): void
  • Returns void

webkitCancelAnimationFrame

  • webkitCancelAnimationFrame(handle: number): void
  • Parameters

    • handle: number

    Returns void

webkitConvertPointFromNodeToPage

  • Parameters

    Returns WebKitPoint

webkitConvertPointFromPageToNode

  • Parameters

    Returns WebKitPoint

webkitRequestAnimationFrame

  • Parameters

    Returns number

Generated using TypeDoc