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

x/evt/lib/index.ts>dom.AbstractWorker

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.AbstractWorker
import { type dom } from "https://deno.land/x/evt@v2.4.18/lib/index.ts";
const { AbstractWorker } = dom;

Properties

onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null

Methods

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