You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Next »
SimpleEventBus is a global variable for the event stream.
A subscription to an event.
Parameters:
Return:
Example:
const obj = SimpleEventBus.on('myEvent', (data) => { alert(data); }) obj.unsubscribe();
Starts an event.
const obj = SimpleEventBus.emit('myEvent', 'text')
Deletes an event.
Parameter:
const obj = SimpleEventBus.deleteEvent('myEvent')
Resets all events and subscriptions.