Skip to content

kdframework/event-emitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Basic event emitter for KDFramework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published