default: {
    handlers: Record<string, unknown>;
    getHandlers(event) => Function[];
    off(event, handler) => void;
    on(event, handler) => void;
    one(event, handler) => void;
    trigger(event, ...args) => void;
}

The evented mixin provides methods allowing an object to trigger events, running externally registered event handlers.

Type declaration

  • Protected handlers: Record<string, unknown>

    Arrays of registered event handlers, grouped by the event name.

    Deprecated

  • getHandlers:function
  • off:function
  • on:function
  • one:function
    • Register an event handler so that it will run only once, and then unregister itself.

      Parameters

      • event: string

        The name of the event.

      • handler: Function

        The function to handle the event.

      Returns void

      Deprecated

  • trigger:function

Deprecated

v1.2, to be removed in v2.0

Generated using TypeDoc v0.24.8