vanillajs-browser-helpers
Version:
Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS in the browser
15 lines (14 loc) • 405 B
TypeScript
import type { VoidFunction } from './shared/types';
export declare function docComplete(): boolean;
/**
* Execute a given function once the document has finished loading
*
* @param handler - Function to execute once the document has finished loading
*
* @example
*
* ```ts
* domReady((e: Event) => { alert('DOM Ready') });
* ```
*/
export default function domReady(handler: VoidFunction): void;