Extension for the BaklavaEvent class. A listener can return false to prevent this event from happening.

Type Parameters

  • T
  • E

Hierarchy (view full)

Constructors

Properties

entity: E

Accessors

Methods

  • Invoke all listeners.

    Parameters

    • data: T

      The data to invoke all listeners with

    Returns {
        prevented: boolean;
    }

    An object, where the prevented field is true when one of the listeners requested to prevent the event, otherwise false

    • prevented: boolean
  • Remove a listener

    Parameters

    • token: any

      The token that was specified when subscribing to the listener. An invalid token does not result in an error.

    Returns void