UNPKG

synthetic-event

Version:

A collection of base classes for custom events and event targets.

12 lines (11 loc) 588 B
import { Event } from "./Event"; import { EventListener } from "./EventListener"; import { EventListenerObject } from "./EventListenerObject"; export declare class EventTarget { protected listenerFunctions: Map<string, Set<EventListener>>; protected listenerObjects: Map<string, Set<EventListenerObject>>; constructor(); addEventListener(type: string, listener: EventListener | EventListenerObject): void; removeEventListener(type: string, listener: EventListener | EventListenerObject): void; dispatchEvent(event: Event, target?: EventTarget): void; }