new EventManager()
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.
- Source:
Members
events :Array
Stores all events in the manager, their target and callback.
Format [target, event, callback, active]
Type:
- Array
- Source:
Methods
add(target, event, callback)
Add new event to the manager.
Parameters:
Name | Type | Description |
---|---|---|
target |
DOM | Event target element. |
event |
String | Event name. |
callback |
function | Callback function. |
- Source:
clear()
Destroys this manager and remove all events.
- Source:
create()
Creates all events in this manager.
- Source:
destroy()
Removes all events in this manager.
- Source: