Tone.Emitter
↳ EXTENDS ToneTone.Emitter gives classes which extend it the ability to listen for and emit events. Inspiration and reference from Jerome Etienne’s MicroEvent. MIT (c) 2011 Jerome Etienne.
CONSTRUCTOR
new Tone.Emitter ( )Methods
.emit ( )
#The name of the event.
The arguments to pass to the functions listening.
this
Invoke all of the callbacks bound to the event with any arguments passed in.
.off ( )
#The event to stop listening to.
The callback which was bound to the event with Tone.Emitter.on. If no callback is given, all callbacks events are removed.
this
Remove the event listener.
.on ( )
#The name of the event to listen for.
The callback to invoke when the event is emitted
this
Bind a callback to a specific event.
.once ( )
#The name of the event to listen for.
The callback to invoke when the event is emitted
this
Bind a callback which is only invoked once