Client
does the DOMContentLoaded event and give it to your client
onDOMLoaded
onDOMLoaded(callback: () => void): Promise<unknown>Parameters
- callback: the function to run when the DOM is loaded
Examples
import { onDOMLoaded } from '@trippler/tr_lib/client'
onDOMLoaded(() => {
console.log('DOM is loaded')
})