3 ms·
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
by blktiger 12y 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();
- yblu 12y agoOr use fastdom[1], which batches reads and writes to reduce layout thrashing. [1]: https://github.com/wilsonpage/fastdom https://github.com/wilsonpage/fastdom