Classes
Methods
(inner) addEventListener(type, listener, once) → {EventDispatcher}
Add a listener for a specific event type.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
type |
String
|
event type |
listener |
function
|
handler function |
once |
Boolean
|
if set handler function will be called only once. |
Returns:
- Type:
-
EventDispatcher
Instance
(inner) dispatchEvent(event) → {EventDispatcher}
Call all registered listeners that match the event type.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
event |
CustomEvent
|
event to be dispatched |
Returns:
- Type:
-
EventDispatcher
Instance.
(inner) hasEventListener(type, listener) → {Boolean}
Indicated if a listener function is already registered for a specific event.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
type |
String
|
|
listener |
function
|
Returns:
- Type:
-
Boolean
(inner) removeEventListener(type, listener) → {EventDispatcher}
Remove a listener for a specific event type.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
type |
String
|
event type |
listener |
function
|
handler function |
Returns:
- Type:
-
EventDispatcher
Instance
(inner) removeEventListeners() → {EventDispatcher}
Drop all event listeners.
- Source:
Returns:
- Type:
-
EventDispatcher
Instance