View Full Version : What does a DOM tree do for a browser?

July 28th, 2012, 09:17 PM
I'm really into how browsers are working at the moment so I'm reviewing inner mechanisms. Why are DOM trees important? Why not just go through all the HTML and render it piece by piece?

Mr. Picklesworth
July 28th, 2012, 10:49 PM
Remember that a web page is very dynamic. Javascript can change any part of a page at any time, including adding or removing elements. CSS rules can also apply dynamically, in conjunction with a script or with the :hover and :focus pseudo-classes.