<pc-script>
The <pc-script>
tag is used to define a script.
Usage
- It must be a direct child of a
<pc-scripts>
component. - The script must have been loaded via the
<pc-asset>
tag.
Attributes
Attribute | Type | Default | Description |
---|---|---|---|
attributes | String | "" | JSON string of script attributes |
enabled | Boolean | "true" | Enabled state of the script |
name | String | - | Script name (must match the script's scriptName property) |
Example
<pc-entity>
<pc-scripts>
<pc-script name="myScript"></pc-script>
</pc-scripts>
</pc-entity>
JavaScript Interface
You can programmatically create and manipulate <pc-script>
elements using the ScriptElement API.