Skip to content

How to do something after any dom update by svelte on the page #5100

Discussion options

You must be logged in to vote

The reason for doing it is for custom instrumentation for various interactive elements. Newly added components could have this custom instrumentation which needs to be updated as this element would get added on the dom later.

What do you mean by "instrumentation" ?
I have the strange feeling you are trying to do something that is already perfectly possible with Svelte without doing something as abstract as detecting any DOM change.

If not, MutationObserver is what you need (but you probably don't)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@itssumitrai
Comment options

@stephane-vanraes
Comment options

@itssumitrai
Comment options

Answer selected by itssumitrai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants