Document Object Model (DOM)
Mar 30, 2022
First thing first, we need to understand how a web page is built.
Critical Rendering Path:
How a browser appeared in a nice formatted interactive interface from a HTML source in a viewport is called “Critical Rendering Path". This part basically involves 2 main stages:
A. Stage 1: Browser parses what will appear on the page.
The result of this stage is a Render tree, in which consists of 2 compulsory elements:
- CSSOM: a representation of styles associated with elements
- DOM: a representation of elements
an object-based representation of the source HTML document. It attempts to convert the structure and content of the HTML document into an object model that be used by various programs. It is represented as node tree.
B. Stage 2: Browser perform rendering