How can I get a function to be executed just after insertion into DOM? #641
-
Hi, I want to know how I can get a function to execute after the insertion of something into the DOM. So a signal updates with some elements and I want to have a function executed after they're inserted into the DOM. Reason for that is that I'm using an IntersectionObserver polyfill that fails if I |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Generally |
Beta Was this translation helpful? Give feedback.
Generally
onMount
when parent context is fully resolved orcreateEffect
if you need it to update with changes after render. That being said these tie into reactive system resolution and have no knowledge of what is actually connected but you can rely on them not executing until the reactive system has applied all DOM updates.