Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventEmitter

General-purpose event emitter.

Hierarchy

Index

Constructors

constructor

Methods

emitEvent

  • emitEvent(ev: string, arg: any): void
  • Emit this event.

    Parameters

    • ev: string

      Event name to emit.

    • arg: any

      Argument to the event handler(s).

    Returns void

off

  • Remove an event handler.

    Parameters

    • ev: string

      Event name.

    • handler: EventHandler

      Handler to remove.

    Returns void

on

  • Set an event handler.

    Parameters

    • ev: string

      Event name, or "*" for all events.

    • handler: EventHandler

      Event handler for this event.

    Returns void

once

  • Set a one-time event handler.

    Parameters

    • ev: string

      Event name, or "*" for all events.

    • handler: EventHandler

      Event handler for this event.

    Returns void

Generated using TypeDoc