injectScript

Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.inject

Append a script tag either to the head or the body

Params

  1. src*-String

    The script src to load

Return

  1. -Promise

    A promise resolved with the script tag when it has fully loaded

Example

import { injectScript } from '@blackbyte/sugar/dom'
injectScript('dist/js/app.js')

Todo

  • testsnormal