Adds a <script> element to the document head. Removed when the rendering context is torn down.
<script>
No-ops if something else already added the script with the same URL.
Optional
import { addScript } from 'reactiveweb/document-head';<template> {{addScript "https://my.cdn.com/asset/v1.2.3/file/path.js"}}</template> Copy
import { addScript } from 'reactiveweb/document-head';<template> {{addScript "https://my.cdn.com/asset/v1.2.3/file/path.js"}}</template>
Adds a
<script>
element to the document head. Removed when the rendering context is torn down.No-ops if something else already added the script with the same URL.