kdf-event-emitter
v0.0.1
Published
Another event emitter.
Downloads
2
Readme
KDEventEmitter
This is a basic event emitter for KDFramework.
Static events API
After mixing in KDEventEmitter
to your class you can use class
and instance
level listeners.
class KDView
@include KDEventEmitter
...
KDView.on eventName, callback
KDView.once eventName, callback
KDView.off eventName # kills all listeners
KDView.emit eventName[, arg1[, arg2[, ...]]]
Instance events API
view = new KDView
view.on eventName, callback
view.once eventName, callback
view.off eventName # kills all listeners
view.emit eventName[, arg1[, arg2[, ...]]]
Authors
- @devrim - Devrim Yasar
- @sinan - Sinan Yasar
- @humanchimp - Chris Thorn