Function importScript

Imports a script and returns a promise that resolves when the script is loaded.

  • Parameters

    • resourceUrl: string

      The url of the script to load.

    • singleton: boolean = true

      If true, the script will only be loaded once.

    • placement: "body" | "head" = "body"

      "body" or "head" to specify where the script should be placed.

    Returns Promise<void>