- fix for broken transitions() method (issue #74)
- helper method to list which events are allowed from the current state (issue #71 - thanks to @mgoldsborough and @chopj)
- added web worker compatability (issue #65 - thanks to @offirmo)
- had to bump the version number after messing up npmjs.org package registration
- Added support for bower
- Added support for nodejs (finally)
- Added ability to run tests in console via nodejs ("npm install" to get node-qunit, then "node test/runner.js")
- Added optional
final
state(s) andisFinished()
helper method (issue #23) - extended
fsm.is()
to accept an array of states (in addition to a single state) - Added generic event callbacks 'onbeforeevent' and 'onafterevent' (issue #28)
- Added generic state callbacks 'onleavestate' and 'onenterstate' (issue #28)
- Fixed 'undefined' event return codes (issue #34) - pull from gentooboontoo (thanks!)
- Allow async event transition to be cancelled (issue #22)
- read more...
- Wrapped in self executing function to be more easily used with loaders like
require.js
orcurl.js
(issue #15) - Allow event to be cancelled by returning
false
fromonleavestate
handler (issue #13) - WARNING: this breaks backward compatibility for async transitions (you now need to returnStateMachine.ASYNC
instead offalse
) - Added explicit return values for event methods (issue #12)
- Added support for wildcard events that can be fired 'from' any state (issue #11)
- Added support for no-op events that transition 'to' the same state (issue #5)
- extended custom error callback to handle any exceptions caused by caller provided callbacks
- added custom error callback to override exception when an illegal state transition is attempted (thanks to cboone)
- fixed typos (thanks to cboone)
- fixed issue #4 - ensure before/after event hooks are called even if the event doesn't result in a state change
- adding support for asynchronous state transitions (see README) - with lots of qunit tests (see test/async.js).
- consistent arguments for ALL callbacks, first 3 args are ALWAYS event name, from state and to state, followed by whatever arguments the user passed to the original event method.
- added a generic
onchangestate(event,from,to)
callback to detect all state changes with a single function. - allow callbacks to be declared at creation time (instead of having to attach them afterwards)
- renamed 'hooks' => 'callbacks'
- read more...
- allows the same event to transition to different states, depending on the current state (see 'Multiple...' section in README.md)
- read more...
- initial version
- read more...