Batman.js is no longer in production at Shopify and is not actively maintained.

This website is left for reference (and for old times' sake).

batman.js

Batman.DelegatingStateMachine adds a simple feature to Batman.StateMachine. DelegatingStateMachine is initalized with a base object and when an event is fired on DelegatingStateMachine, it fires the same event on the base. For an example of DelegatingStateMachine, see Batman.Model.InstanceLifecycleStateMachine in the batman.js source.

Help us improve our documentation!

Contributions to this page are welcome on Github. If you find a problem but you cannot fix it, please open an issue.

Discussion regarding batman.js documentation is also welcome on our mailing list.