@tempots/dom
OnMount() function
Executes a callback function when the parent element is mounted in the DOM.
Signature:
OnMount: extends Element>(fn: (element: T) => Clear | undefined | void) => Renderable
Parameters
Parameter |
Type |
Description |
---|---|---|
fn |
(element: T) => Clear | undefined | void |
The callback function to be executed. |
Returns: Renderable
- The renderable function.