4 ms·
Huh, I was expecting MutationObserver[1] (which is the 'proper' way to do this, by the way). Not sure about the performance though - MutationObserver probably c
by mediumdeviation 11y ago
Huh, I was expecting MutationObserver[1] (which is the 'proper' way to do this, by the way). Not sure about the performance though - MutationObserver probably comes with more overhead.
[1]: https://developer.mozilla.org/en/docs/Web/API/MutationObserver https://developer.mozilla.org/en/docs/Web/API/MutationObserv...
- tiago_simoes 11y agoYup, that's certainly another option. Haven't tried it, but I would say that the asynchronous nature of mutationobserver would make this blink the elements before animating them.
- elmin 11y agoIn my experience you can change an element with a Mutation Observer before it is rendered.
- tiago_simoes 11y agocool, in that case I'll definetly try it.