What is CSSOM

A typical html file with some CSS will have the style sheet

While the browser receives the raw bytes of data and kicks off the DOM construction process, it will also make a request to fetch the main.css stylesheet linked.

As soon the browser begins to parse the html, upon finding a link tag to a css file, it simultaneously makes a request to fetch that.

As you may have guessed, the browser also receives the raw bytes of CSS data, whether from the internet or your local disk.

But what exactly is done with these raw bytes of CSS data?

Well, most people know there’s something called the DOM. In the same way, there’s also a CSS tree structure called the CSS Object Model, CSSOM for short.

The render tree
What we’ve got right now are two independent tree structures that don’t seem to have a common goal.

The DOM and CSSOM tree structures are two independent structures.

The DOM contains all the information about the page’s HTML element’s relationships, while the CSSOM contains information on how the elements are styled.

Okay, the browser now combines the DOM and CSSOM trees into something called a render tree.

Uday Ogra

Connect with me at http://facebook.com/tendulkarogra and lets have some healthy discussion :)

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *