A JavaScript State Chart interpreter that fully implements the W3C's upcoming SCXML recommendation
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
w3c_tests changed the error event for SpeehSynthesisUtterances to speak.error Mar 12, 2014
.gitignore first numbered version, new dev status page Mar 12, 2014
LICENSE.txt Added LICENSE file Dec 15, 2012
README.md updated links to jsscxml.org in README May 1, 2018
SCxml.js fixed speechSynthesis crash Aug 12, 2015
SCxml.ugly.js fixed speechSynthesis crash Aug 12, 2015
SCxmlConnect.js minor bugfix in a RegExp May 29, 2013
SCxmlDatamodel.js fixed speechSynthesis crash Aug 12, 2015
SCxmlDebug.js fix SVG arrows partially hidden Mar 7, 2015
SCxmlEvent.js event names must always be a string Dec 10, 2013
SCxmlExecute.js put all the inline data parsing in one place Mar 31, 2014
SCxmlFetch.js empty data now properly results in a GET request, not POST "{}" Mar 31, 2014
SCxmlInvoke.js implemented connection-like <invoke> and the "event-stream" type May 12, 2013
SCxmlMutation.js added viz for initial targets Mar 7, 2015
SCxmlProcessors.js removed logging May 30, 2013
SCxmlSpeak.js changed the error event for SpeehSynthesisUtterances to speak.error Mar 12, 2014
SCxmlView.css added viz for initial targets Mar 7, 2015
api.html documented the new File source type Mar 13, 2014
connect.html missed another reference to <connect> May 13, 2013
delays.js implemented pause/resume for delayed events! May 9, 2013
dom.html included the new Invoke module in all demo files Mar 9, 2013
event-stream.html documented the new invoke stuff May 12, 2013
fetch.html added namespace to the <fetch> documentation Apr 13, 2013
speak.html improved <speak> documentation Mar 12, 2014
structures.js implemented the preemption algorithm discussed in the working group p… Mar 21, 2013
test.html added back test 428 (still doesn't pass) Dec 10, 2013
uglify.sh added the new <speak> stuff to the debugger and package Mar 10, 2014
uitest.scxml changed the DOM test to something useful for an animated UI walkthrough Nov 4, 2012
viewer.html changed the source field type to "text" to accept relative URLs Apr 16, 2014
xhr.js first working prototype, passes the first W3C test Jun 19, 2012

README.md

JSSCxml

A JavaScript State Chart interpreter that fully implements the W3C's upcoming SCXML recommendation in Web browsers.

The name should be pronounced "JessieXML" or just "Jessie".

It is distributed under a MIT license.

Official website: jsscxml.org

Main Features:

Development status

Latest version: 0.9.1

See the version history and goals.

You can't <send> or receive remote events (of any type) with I/O Processors, but you can already use the included custom <fetch> and <invoke type="event-stream"> elements to get similar results in a client-server fashion.

As mentionned above, you can't <send> SCXML events over HTTP. But you can listen to remote events after invoking a connection with event-stream type.

Known issues

(that I'm not going to fix right now)

  • Variables whose name matched a predefined window variable are pre-declared in the datamodel. You should not delete them if you don't understand what it means and how the datamodel is implemented in JSSC.

  • The JavaScript expression in the location attribute of an <assign> element is currently being evaluated twice while executing the <assign>. That could cause a bug if it has side-effects. You should perform any such actions in a <script>, and use read-only expressions in location attributes. Or you can just write the whole assignment in a <script>, of course.

  • In ECMAScript content, the keyword "this" references a hidden window by default. You should only use it in constructors and object methods, never in a default context, unless you really know what you're doing.