Coffeekraken.io 0.0.1

stylesheetsReady

Wait until all the HTMLLinkElement's are properly loaded

Name Type Description Status Default
links { Array } The HTMLLinkElement tags to process required
cb { Function } An optional callback function to call when all the links are loaded optional null

Return { Promise } The promise that will be resolved when all the links are loaded

Example

    import stylesheetsReady from 'sugarcss/js/dom/stylesheetsReady'
stylesheetsReady([
        myHTMLLinkElement1,
        myHTMLLinkElement2
]).then(() => {
        // do something when all the links are loaded
});

Author : Olivier Bossel olivier.bossel@gmail.com