Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.14 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.14 KB

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

History