> The advice to "touch the DOM as little as possible" stems from the fact that the DOM has so many performance pitfalls.
What are those performance pitfalls?The only ones I know are that if you read something related to the layout size (offsetHeight), it might cause layout recalculation. And obviously if you modify how element looks like (innerHTML, changing class, etc).
This doesn't seem like much (assuming I dit not forget something). The first one is not obvious through.