injectStylesheet

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

Append a stylesheet link to the page head

Params

  1. href*-String

    The url to the stylesheet

Return

  1. -Promise

    A promise when the stylesheet is loaded with the link element as parameter

Example

import { injectStylesheet } from '@blackbyte/sugar/dom'
injectStylesheet('/dist/css/style.css')

Todo

  • testsnormal