Interface IEventSubscriber

IEventSubscriber provides a minimal interface for subscribing to, and unsubscribing from events.

This interface as added mainly as a way of abstracting subscriptions to HTML events, to make the system more easily testable.

Hierarchy

  • IEventSubscriber

Implemented by

Methods

  • Add a subscription to some event by name.

    Parameters

    • eventName: string

      The event to subscribe to.

    • handler: any

      The function to be called when the event is fired. The expected function definition will depend upon which event is being subscribed to.

    Returns any

  • Remove a subscription to some event by name.

    Parameters

    • eventName: string

      The event to unsubscribe from.

    • handler: any

      The function to be called when the event is fired. The expected function definition will depend upon which event is being subscribed to.

    Returns any

Generated using TypeDoc