deno / latest / ~ / window.html

Window

class Window extends EventTarget {
    
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;
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;
new(): Window;
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;
}

Extends

EventTarget

Properties

alert: (message?: string) => void
caches: CacheStorage
close: () => void
closed: boolean
confirm: (message?: string) => boolean
Deno: Deno
localStorage: Storage
location: Location
Location: Location
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
self: Window & globalThis
sessionStorage: Storage
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, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
new(): Window
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

© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/Window