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

x/xdg/vendor/types/deno.d.ts>Worker

Determine XDG Base Directory paths (OS/platform portable)
Go to Latest
class Worker
extends EventTarget
import { Worker } from "https://deno.land/x/xdg@v10.5.1/vendor/types/deno.d.ts";

Constructors

new
Worker(specifier: string, options?: WorkerOptions)

Properties

optional
onerror: (e: ErrorEvent) => void
optional
onmessage: (e: MessageEvent) => void
optional
onmessageerror: (e: MessageEvent) => void

Methods

addEventListener<K extends keyof WorkerEventMap>(
type: K,
listener: (this: Worker, ev: WorkerEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
postMessage(message: any, transfer: ArrayBuffer[]): void
postMessage(message: any, options?: PostMessageOptions): void
removeEventListener<K extends keyof WorkerEventMap>(
type: K,
listener: (this: Worker, ev: WorkerEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
terminate(): void