Documentation for the Statechartz Javascript Library

Overview

The Statechartz Javascript library is meant to provide heirarchical statechart support for web-sites and web-apps, based on the SCXML standard. It includes most of the basic SCXML features, including state heirarchy, parallel states, final/initial/history pseudo-states, conditional transitions and executable activities.
The Statechartz library is meant to help manage the complexity of web-apps, allowing for more dynamic web experience with less lines of code.

Browser Support

Statechartz is currently only tested with webkit browsers (QtWebkit / Arora, Safari, Chrome). Other browser support might be added in time.

Authoring using SCXML

The standard way to author for Statechartz is with SCXML. By having a separate SCXML file next to the HTML and Javascript assets, the flow can be separated from the graphics and the logic of the application.
Note that only a subset of the SCXML standard is supported: The tags scxml, state, parallel, initial, final, history, transition, raise, send, if, else, elseif, script, data, and datamodel are the supported tags.
An SCXML file can be loaded in the 2 following ways:

Authoring using agile Javascript syntax

Connecting with HTML and CSS

Gotchas