reactiveweb
    Preparing search index...

    Function addScript

    • 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.

      Parameters

      • url: string | (() => string)
      • Optionalattributes: HTMLScriptElement

      Returns void

      import { addScript } from 'reactiveweb/document-head';

      <template>
      {{addScript "https://my.cdn.com/asset/v1.2.3/file/path.js"}}
      </template>