ready
Official
Executes a function when the DOM is ready.
Example:
ready(() => { console.log('DOM is ready');});
**Signature:**
```tsfunction ready(fn: () => unknown): voidParameters:
| Parameter | Type | Description |
|---|---|---|
fn | () => unknown | The function to execute when the DOM is ready. |
Returns: void
Example:
ready(() => { console.log('DOM is ready');});