Skip to main content
class Window
extends EventTarget

Properties

alert: (message?: string) => void
caches: CacheStorage
close: () => void
readonly
closed: boolean
confirm: (message?: string) => boolean
Deno: Deno
localStorage: Storage
location: Location
Location: Location
navigator: Navigator
Navigator: Navigator
onbeforeunload: ((this: Window, ev: Event) => any) | null
onerror: ((this: Window, ev: ErrorEvent) => any) | null
onload: ((this: Window, ev: Event) => any) | null
onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null
onunload: ((this: Window, ev: Event) => any) | null
prompt: (message?: string, defaultValue?: string) => string | null
readonly
self: Window & globalThis
sessionStorage: Storage
readonly
window: Window & globalThis

Methods

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