top | item 31370767

(no title)

Sillzen | 3 years 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...

discuss

order

afavour|3 years ago

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