Namespace: Events:onDomReady

Events:onDomReady

Source:

Methods

onDomReady(callback)

Executes a callback on document ready (DOM parsed, complete and usable, not loaded/onload).

Parameters:
Name Type Description
callback function

function to execute, once document is parsed and ready

Source:
Example
onDomReady(() => {
    document.body.classList.add('dom-ready');
});