Contents | Overview | Examples | Editor | Forum |
---|
The <script> element adds scripting capability to the state machine.
Example:
<script>print('Hello, world!')</script>
Name | Required | Attribute Constraints | Default Value | Valid Values | Description |
---|---|---|---|---|---|
src | false | May not occur if the element has children. | none | A valid URI | Gives the location from which the script should be downloaded. |
The child content of the <script> element represents the script code to be executed.
A conformant SCXML document must specify either the 'src' attribute or child content, but not both. If 'src' is specified, the SCXML Processor must download the script from the specified location at load time. If the script can not be downloaded within a platform-specific timeout interval, the document is considered non-conformant, and the platform must reject it.
If the script specified by the 'src' attribute of a script element cannot be downloaded within a platform-specific timeout interval, the document is considered non-conformant, and the platform MUST reject it. N.B. This test is valid only for datamodels that support scripting.
The SCXML Processor MUST evaluate any script element that is a child of scxml at document load time. N.B. This test is valid only for datamodels that support scripting.
In a conformant SCXML document, the name of any script variable MAY be used as a location expression. N.B. This test is valid only for datamodels that support scripting.
In a conformant SCXML document, the name of any script variable MAY be used as a location expression. N.B. This test is valid only for datamodels that support scripting.
TOP | Contents | Overview | Examples | Editor | Forum |
---|