Skip to main content

<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

AttributeTypeDefaultDescription
attributesString""JSON string of script attributes
enabledBoolean"true"Enabled state of the script
nameString-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.