EventManager Class

Module: Utils

EventManager is used to manager DOM events creationg and destruction in a single function call.

It is used by objects to make it easier to add and remove events from global DOM objects.

Constructor

EventManager

()

Item Index

Attributes

Methods

add

(
  • target
  • event
  • callback
)

Add new event to the manager.

Parameters:

  • target DOM

    Event target element.

  • event String

    Event name.

  • callback Function

    Callback function.

clear

()

Destroys this manager and remove all events.

create

()

Creates all events in this manager.

destroy

()

Removes all events in this manager.

Attributes

events

Array

Stores all events in the manager, their target and callback.

Format [target, event, callback, active]