Class EventManager

EventManager is used to manage DOM events from multiple element.

Events can be created for multiple DOM objects and managed from a single point.

Constructors

Methods

  • Add new event to the manager, the event is not created immediately the create() method had to be called to create the event.

    Parameters

    • target: any

      Event target element.

    • event: string

      Event name.

    • callback: Function

      Callback function.

    Returns void

  • Add and create and event to the event manager.

    Creates the event and attaches it to the DOM element immediately.

    Parameters

    • target: any

      Event target element.

    • event: string

      Event name.

    • callback: Function

      Callback function.

    Returns void

  • Destroys this manager and remove all events.

    Returns void

  • Remove and destroy event(s) from a DOM element and from the manager.

    Parameters

    • target: any

      Event target element to remove elements from.

    • event: string

      Event name to be removed.

    Returns void