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

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

A modern runtime for JavaScript and TypeScript.
Latest
interface Window
implements EventTarget
import { type Window } from "https://deno.land/x/deno@v1.41.0/cli/tsc/dts/lib.deno.window.d.ts";

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
import { Window } from "https://deno.land/x/deno@v1.41.0/cli/tsc/dts/lib.deno.window.d.ts";

type

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