Methods related to attaches custom events handlers to the specified widget.
Methods
# addListener(evt, func)
Let to attach events handler. Several functions can be attached to the same event name.
Parameters:
Name | Type | Description |
---|---|---|
evt |
string
|
Event name. |
func |
function
|
Callback function. |
# removeAllListeners(evt)
Remove all listener for a particular event.
Parameters:
Name | Type | Description |
---|---|---|
evt |
string
|
Event name. |
# removeListenerByIndex(evt, index)
Remove a particular event listener by index.
Parameters:
Name | Type | Description |
---|---|---|
evt |
string
|
Event name. |
index |
number
|
Index number. |