back

by tobr·10y ago·view on hn ↗
Wow, overriding methods in the HTMLElement prototype to animate everything. It's so crazy it might work.

I think the readme should explain how it works though, and that it is a huge hack.

2 comments
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/MutationObserv...

Yup, 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.
In my experience you can change an element with a Mutation Observer before it is rendered.
cool, in that case I'll definetly try it.
tkx for the feedback. done.