summaryrefslogtreecommitdiffstats
path: root/test/uscxml/test-dom.scxml
diff options
context:
space:
mode:
Diffstat (limited to 'test/uscxml/test-dom.scxml')
-rw-r--r--test/uscxml/test-dom.scxml19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/uscxml/test-dom.scxml b/test/uscxml/test-dom.scxml
new file mode 100644
index 0000000..73b449c
--- /dev/null
+++ b/test/uscxml/test-dom.scxml
@@ -0,0 +1,19 @@
+<scxml datamodel="ecmascript">
+ <state id="start">
+ <onentry>
+ <script>
+ var transition = document.createElement("transition");
+ transition.setAttribute("target", "final");
+ transition.setAttribute("event", "quit");
+ var nodeSet = document.evaluate("//state[@id='start']").asNodeSet();
+ nodeSet[0].appendChild(transition);
+ </script>
+ <raise event="quit" />
+ </onentry>
+ </state>
+ <final id="final">
+ <onentry>
+ <log expr="'Quitting!'" />
+ </onentry>
+ </final>
+</scxml> \ No newline at end of file