Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Dispatcher

Event dispatcher for subscribing and publishing categorized events.

Hierarchy

Index

Methods

addEventListener

  • addEventListener(type: string, listener: Listener): void

clearEventListeners

  • clearEventListeners(type?: string): void
  • Unsubscribes all listener functions to a single event type or all event types.

    Parameters

    • Optional type: string

      The event type, or all event types if not specified

    Returns void

dispatchEvent

  • dispatchEvent<T>(event: T): void

removeEventListener

  • removeEventListener(type: string, listener: Listener): void