Class: EventDispatcher

requiem~events.EventDispatcher

Custom event dispatcher object.

Constructor

new EventDispatcher()

Creates a new EventDispatcher instance.
Source:

Methods

addEventListener(type, listener)

Adds an event listener to this EventDispatcher instance.
Parameters:
Name Type Description
type string
listener function
Source:

dispatchEvent(event)

Dispatches the specified event.
Parameters:
Name Type Description
event Event
Source:

hasEventListener(type, listeneropt) → {boolean}

Determines whether this EventDispatcher instance has a specific event listener registered. If no listener is specified, it will check if any listener of the specified event type is registered.
Parameters:
Name Type Attributes Description
type string
listener function <optional>
Source:
Returns:
Type
boolean

off()

Source:
See:

on()

Source:
See:

removeAllEventListeners()

Removes all cached event listeners from this Element instance.
Source:

removeEventListener(type, listener:undefined)

Removes an event listener from this EventDispatcher instance. If no listener method is specified, all the listeners of the specified type will be removed.
Parameters:
Name Type Description
type string
listener:undefined function
Source: