Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.worker.d.ts>DedicatedWorkerGlobalScope

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

Properties

readonly
name: string
onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null
onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null

Methods

addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(
type: K,
listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
close(): void
postMessage(message: any, transfer: Transferable[]): void
postMessage(message: any, options?: StructuredSerializeOptions): void
removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(
type: K,
listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void