new EventHandler(acceptedEventHandlersopt)
An EventHandler
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
acceptedEventHandlers |
Array.<String>
|
<optional> |
[] |
String of allowed events. |
Methods
clearEvent(eventNames)
Parameters:
Name | Type | Description |
---|---|---|
eventNames |
String
|
emit(eventName, …args) → {Boolean}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
eventName |
String
|
||
args |
*
|
<repeatable> |
Arguments to pass to listeners |
Returns:
- Type:
-
Boolean
true if all handlers return true, else false
off(eventNames, eventListener)
Parameters:
Name | Type | Description |
---|---|---|
eventNames |
String
|
|
eventListener |
callback
|
on(eventNames, eventListener)
Parameters:
Name | Type | Description |
---|---|---|
eventNames |
String
|
|
eventListener |
callback
|
once(eventName, eventListener)
Parameters:
Name | Type | Description |
---|---|---|
eventName |
String
|
|
eventListener |
callback
|