To prevent layout thrashing yourself, you can use this library: https://github.com/wilsonpage/fastdom
Ember.JS (and possibly Angular?) does this for you automatically.
Ember.JS (and possibly Angular?) does this for you automatically.
Dirty checking and watch execution happens in batches, but the resulting DOM updates are executed ad-hoc within each batch iteration - without any regard for requestAnimationFrame or forced synchronous layouts for instance.