Skip to main content
interface Window
implements 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
Navigator: Navigator
navigator: Navigator
Location: Location
location: Location
localStorage: Storage
sessionStorage: Storage
caches: CacheStorage
name: string

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
variable Window

type

{ readonly prototype: Window; new (): never; }