new Emitter()

Description
Provides an event base class for devices. It is not meant to be used directly.
Details

Methods


on( event, listener )

Description
Create an event listener
Parameters
Name Type Description
event string The name of the event to listen for
listener function A callback to run when the event is fired.
Details

removeListener( event, listener )

Description
Remove an event listener
Parameters
Name Type Description
event string The name of the event that we are removing a listener from
listener function The callback that we are removing
Details

emit( event )

Description
Emit an event
Parameters
Name Type Description
event string The name of the event to emit
Details

once( event, listener )

Description
Create an event listener that will only fire one time.
Parameters
Name Type Description
event string The name of the event to listen for
listener function A callback to run when the event is fired.
Details