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 |
Example
onDomReady(() => {
document.body.classList.add('dom-ready');
});