Skip to main content

<pc-script>

The <pc-script> tag is used to define a script.

note
  • It must be a direct child of a <pc-scripts> component.
  • The script must have been loaded via the <pc-asset> tag.

Attributes

AttributeDescription
attributesA JSON string of attributes for the script.
enabledEnabled state of the script. If not specified, true is used.
nameThe name of the script. The name is the class name of the script in camel case.

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.