Interface TypedEventTarget<EventMap>

interface TypedEventTarget<EventMap> {
    addEventListener<K>(type, listener, options?): void;
    dispatchEvent(event): boolean;
    dispatchEvent(event): boolean;
    listenerCount(type): number;
    removeEventListener<K>(type, listener?, options?): void;
    removeEventListener(type, listener?, options?): void;
    safeDispatchEvent<Detail>(type, detail): boolean;
}

Type Parameters

  • EventMap extends Record<string, any>

Hierarchy (view full)

Implemented by

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean