Reputation: 739
In a stackoverflow question said cssom and dom are generated synchronous.If cssom generates firstly, how does it know how the dom look like and generate a cssom tree look like a dom tree plus css properties as pic shown above.why not look like this according to the css.
when my html is like this as below.I can also use the style as above;
Even when my html look like this.
Upvotes: 2
Views: 953
Reputation: 1725
CSSOM doesn't need to know anything about the dom, because CSSOM is a tree of styling rules only.
You are referring to Render Tree, which is created after DOM and CSSOM are ready.
To make it more clear:
Upvotes: 2
Reputation:
You can find the detailed explanation in the below link Render Tree
Upvotes: 1