-
Notifications
You must be signed in to change notification settings - Fork 147
machina.eventListeners
Jim Cowart edited this page Nov 11, 2012
·
1 revision
The eventListeners
member of the top level machina
object holds event subscribers for events emitted from the machina namespace itself. It is an object that has a key for any event emitted, and the value of the key is an array of subscriber callbacks. Subscribers get added by calling machina.on("eventName", callback)
, and can unsubscribe via machina.off("eventName", callback)
.
Currently, the only event emitted is the newfsm
event (triggered after an FSM's initialize
call runs, and before it transitions to the initialState
).