EventBus

EventBus

# new EventBus(Event, EventHolder)

event bus allows emitting of events and adding event listeners
Parameters:
Name Type Description
Event Event an event class
EventHolder EventHolder event holder class
Source:

Methods

# addListener(eventName, callback) → {Event}

adds an event listener to the bus
Parameters:
Name Type Description
eventName string the name of the event
callback function the function to call on the event
Source:
Returns:
- the new event
Type
Event

# emit(name, vals)

emits an event of the bus
Parameters:
Name Type Description
name string the name of the event being emitted
vals * the values to call the callback with
Source:

# removeListener(event)

removes an event from the event listener
Parameters:
Name Type Description
event Event event to remove
Source: