Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/dts/lib.deno.window.d.ts>Window

A modern runtime for JavaScript and TypeScript.
Go to Latest
class Window
extends EventTarget
import { Window } from "https://deno.land/x/deno@v1.28.1/cli/dts/lib.deno.window.d.ts";

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