8 ms·
>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
by Sillzen 4y 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/MutationObserver https://developer.mozilla.org/en-US/docs/Web/API/MutationObs...
- afavour 4y agoI don't think so. MutationObserver makes no guarantee that the changes have rendered to the screen, just that the DOM tree has changed.