Window - Web documentation
interface Window
extends EventTarget

Properties

readonly
window: Window & globalThis
readonly
self: Window & globalThis
onerror: ((
this: Window,
) => any) | null
onload: ((
this: Window,
ev: Event,
) => any) | null
onbeforeunload: ((
this: Window,
ev: Event,
) => any) | null
onunload: ((
this: Window,
ev: Event,
) => any) | null
onunhandledrejection: (() => any) | null
onrejectionhandled: (() => 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,
) => any
,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof WindowEventMap>(
type: K,
listener: (
this: Window,
) => any
,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void