onMount
onMount is for Elements that need to run some initialization after these have been connected to the document. Is available exclusively to Elements via an attribute.
As of this writing, the onMount callbacks, will run after the current batch of Nodes have been inserted into the document, before paint, in recursive order, and before the ready callbacks.
It is recomended to pass to this API a signal if any work with it will be done in parallel to avoid race-conditions.
# Arguments
name | type | description |
---|---|---|
fn | fn | function to run once the Element is connected to the document |
# Snippet
# Timing
Displays current timings of ready vs onMount