mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-12-18 16:41:58 +00:00
Feathers: event listeners
This commit is contained in:
parent
2cd1e38b0e
commit
a27ab16eb9
@ -87,6 +87,7 @@ myService.hooks(hooks) // register hooks for this se
|
||||
myService.publish([event, ] publisher) // register an event publishing callback
|
||||
myService.mixin(mixin) // extends the functionality of a service
|
||||
myService.on(eventname, listener) // registers a listener method for the given eventname
|
||||
myService.once(eventname, listener) // registers a listener method for the given eventname that will be triggered only one time
|
||||
myService.emit(eventname, data) // emits the event eventname to all event listeners
|
||||
myService.removeListener(eventname, [ listener ]) // removes all listeners (or the given listener) for eventname
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user