EventHandle manages the binding and unbinding of event listeners. It provides a convenient way to add, remove, and invoke event handlers associated with specific event names. Each EventHandle is linked to an 'owner' object, typically an instance of the Events class, allowing for elegant event management and chaining.

Constructors

Methods

Constructors

Methods

  • Invokes the callback function associated with the event handle. This method directly triggers the event's callback without the event being emitted by the event system.

    Parameters

    • Rest...args: any

    Returns void

  • Unbinds the event handle from the owner, effectively removing the event listener. After calling this method, the event handle will no longer trigger the callback function when the event is emitted.

    Returns void