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

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

Readonly applicationCache

applicationCache: ApplicationCache

Readonly caches

caches: CacheStorage

Readonly clientInformation

clientInformation: Navigator

Readonly closed

closed: boolean

Readonly crypto

crypto: Crypto

customElements

customElements: CustomElementRegistry

defaultStatus

defaultStatus: string

Readonly devicePixelRatio

devicePixelRatio: number

Readonly doNotTrack

doNotTrack: string

Readonly document

document: Document

Readonly event

event: Event | undefined
deprecated

Readonly external

external: External
deprecated

Readonly frameElement

frameElement: Element

Readonly frames

frames: Window

Readonly history

history: History

Readonly indexedDB

indexedDB: IDBFactory

Readonly innerHeight

innerHeight: number

Readonly innerWidth

innerWidth: number

Readonly isSecureContext

isSecureContext: boolean

Readonly length

length: number

Readonly localStorage

localStorage: Storage

location

location: Location

Readonly locationbar

locationbar: BarProp

Readonly menubar

menubar: BarProp

Readonly msContentScript

msContentScript: ExtensionScriptApis

name

name: string

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

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: PromiseRejectionEvent) => 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

Optional ontouchcancel

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

Optional ontouchend

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

Optional ontouchmove

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

Optional 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

Readonly orientation

orientation: string | number
deprecated

Readonly origin

origin: string

Readonly outerHeight

outerHeight: number

Readonly outerWidth

outerWidth: number

Readonly pageXOffset

pageXOffset: number

Readonly pageYOffset

pageYOffset: number

Readonly parent

parent: Window

Readonly performance

performance: Performance

Readonly personalbar

personalbar: BarProp

Readonly screen

screen: Screen

Readonly screenLeft

screenLeft: number

Readonly screenTop

screenTop: number

Readonly screenX

screenX: number

Readonly screenY

screenY: number

Readonly scrollX

scrollX: number

Readonly scrollY

scrollY: number

Readonly scrollbars

scrollbars: BarProp

Readonly self

self: Window & typeof globalThis

Readonly sessionStorage

sessionStorage: Storage

Readonly speechSynthesis

speechSynthesis: SpeechSynthesis

status

status: string

Readonly statusbar

statusbar: BarProp

Readonly styleMedia

styleMedia: StyleMedia

Readonly toolbar

toolbar: BarProp

Readonly top

top: Window

Readonly visualViewport

visualViewport: VisualViewport

Readonly window

window: Window & typeof globalThis

Methods

addEventListener

alert

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

    • Optional message: any

    Returns void

atob

  • atob(data: string): string
  • Parameters

    • data: string

    Returns string

blur

  • blur(): void
  • Returns void

btoa

  • btoa(data: string): string
  • Parameters

    • data: string

    Returns string

cancelAnimationFrame

  • cancelAnimationFrame(handle: number): void

captureEvents

  • captureEvents(): void
  • deprecated

    Returns void

clearInterval

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

    • Optional handle: number

    Returns void

clearTimeout

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

    • Optional handle: number

    Returns void

close

  • close(): void
  • Returns void

confirm

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

    • Optional message: string

    Returns boolean

createImageBitmap

departFocus

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?: string, target?: string, features?: string, replace?: boolean): Window | null
  • Parameters

    • Optional url: string
    • Optional target: string
    • Optional features: string
    • Optional replace: boolean

    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?: string, _default?: string): string | null
  • Parameters

    • Optional message: string
    • Optional _default: string

    Returns string | null

queueMicrotask

releaseEvents

  • releaseEvents(): void
  • deprecated

    Returns void

removeEventListener

requestAnimationFrame

resizeBy

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

    • x: number
    • y: number

    Returns void

resizeTo

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

    • width: number
    • height: 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?: number, ...arguments: any[]): number
  • Parameters

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

    Returns number

setTimeout

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

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

    Returns number

stop

  • stop(): void
  • Returns void

webkitCancelAnimationFrame

  • webkitCancelAnimationFrame(handle: number): void
  • Parameters

    • handle: number

    Returns void

webkitConvertPointFromNodeToPage

webkitConvertPointFromPageToNode

webkitRequestAnimationFrame

  • Parameters

    Returns number

Generated using TypeDoc