I want to get an element. The quickest way to do that seems to be through event.target
. So I want an event that is triggered as soon as an element is initialized, and then never again
Something like this
<div
onInit$={(e)=>{
// do stuff with e.target
}}></div>
I've tried onLoad$ and onComplete$, niether of which did what you would expect them to. Also onDomContentLoaded isnt a thing
You could use useVisibleTask for triggering a function when the component is rendered in the client side
https://qwik.builder.io/docs/components/tasks/#usevisibletask