Coffeekraken.io 0.0.1

domReady

Wait that the dom is ready before resolving the promise

Name Type Description Status Default
cb { Function } An optional callback that will be called when the dom is ready required

Return { Promise } A promise that will be resolved when the dom is ready

Example

    import domReady from 'sugarcss/js/dom/domReady'
// using callback
domReady(() => {
        // do something
});
// using promise
domReady().then(() => {
        // do something
});

Author : Olivier Bossel olivier.bossel@gmail.com