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.worker.d.ts>WorkerGlobalScope

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

Properties

caches: CacheStorage
Deno: Deno
readonly
location: WorkerLocation
readonly
navigator: WorkerNavigator
onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null
onunhandledrejection: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null
readonly
self: WorkerGlobalScope & globalThis

Methods

addEventListener<K extends keyof WorkerGlobalScopeEventMap>(
type: K,
listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(
type: K,
listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void