You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
Jon Parsons edited this page Feb 16, 2015
·
1 revision
Scribe Components
Event Emitter
Setup
var emitter = new EventEmitter();
Methods
on
emitter.on('event-key', function eventHandle(){ /*do some stuff*/ });
Allow an event handle to be registered to a specific event key.
off
emitter.off('event-key', function eventHandle(){ /*do some stuff*/ });
Remove an event handle for a given event key.
trigger
emitter.trigger('event-key');
Trigger all event handles for a given event key.
Waterfall Events
The scribe event emitter has limited functionality for ordering events. If you register an event key of my:custom:event event execution will look like this: