Hacker News new | ask | show | jobs
by Sillzen 1493 days ago
>Suppose you want to make some DOM change, and then when that change has actually been rendered so that the user can see it you want to do something else.

>How do you actually wait for a DOM change to show up?

I believe that use case would be covered by MutationObserver[0].

[0] https://developer.mozilla.org/en-US/docs/Web/API/MutationObs...

1 comments

I don't think so. MutationObserver makes no guarantee that the changes have rendered to the screen, just that the DOM tree has changed.