Class YListener
Defined in: YListener.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Custom listener for custom events .
|
Method Attributes | Method Name and Description |
---|---|
addListener(eventDesc, Function, datas)
add a custom listener
|
|
clear(eventDesc)
remove all custom listeners
|
|
fire(eventDesc, params)
fire custom listeners
|
|
hasListener(eventDesc)
return true if 'eventDesc' listeners exists.
|
|
removeListener(eventDesc, Function, datas)
remove a custom listener
|
Method Detail
addListener(eventDesc, Function, datas)
add a custom listener
- Parameters:
- {string} eventDesc
- custom event name.
- {function} Function
- function called when custom event is fired.
- {mixed} datas Optional
- miscalenous datas that could be used by Function.
clear(eventDesc)
remove all custom listeners
- Parameters:
- {string} eventDesc Optional
- If set, remove only every custom listeners having this value.
fire(eventDesc, params)
fire custom listeners
- Parameters:
- {string} eventDesc
- custom event name.
- {array} params
- parameters to fire.
hasListener(eventDesc)
return true if 'eventDesc' listeners exists.
- Parameters:
- {string} eventDesc
- custom event name.
removeListener(eventDesc, Function, datas)
remove a custom listener
- Parameters:
- {string} eventDesc
- custom event name.
- {function} Function
- function called when custom event is fired.
- {mixed} datas Optional
- miscalenous datas that could be used by Function.