shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
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
- $linksnullArray<HTMLLinkElement>
The HTMLLinkElement tags to process. If not passed, take the local stylesheets links
Return
- -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
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space