Window - Web documentation
interface Window
extends EventTarget

Properties

readonly
window: Window & globalThis
readonly
self: Window & globalThis
onerror: ((this: Window, ev: ErrorEvent) => any) | null
onload: ((this: Window, ev: Event) => any) | null
onbeforeunload: ((this: Window, ev: Event) => any) | null
onunload: ((this: Window, ev: Event) => any) | null
onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null
onrejectionhandled: ((this: Window, ev: PromiseRejectionEvent) => any) | null
close: () => void
readonly
closed: boolean
alert: (message?: string) => void
confirm: (message?: string) => boolean
prompt: (message?: string, defaultValue?: string) => string | null
Deno: Deno
name: string

Methods

addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
removeEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void