Hacker News new | ask | show | jobs
by blktiger 4167 days ago
In theory they could add some new methods to the DOM api to allow for this, but it would be non-standard and currently none of the browsers have it.

Something like this maybe?

batchDomChanges(); ... dom changes here ... flushDomChanges();

1 comments

Or use fastdom[1], which batches reads and writes to reduce layout thrashing.

[1]: https://github.com/wilsonpage/fastdom