whenStylesheetsReady

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

Wait until all the HTMLLinkElement’s are properly loaded

Params

  1. $linksnullArray<HTMLLinkElement>

    The HTMLLinkElement tags to process. If not passed, take the local stylesheets links

Return

  1. -Promise<void>

    The promise that will be resolved when all the links are loaded

Example

import { whenStylesheetsReady } from '@blackbyte/sugar/dom'
whenStylesheetsReady([
		$myHTMLLinkElement1,
		$myHTMLLinkElement2
]).then(stylesheets => {
     // do something...
});

Todo

  • testsnormal