Lädt...

🔧 Deciphering the Origins: Why the DOM is called the DOM?


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Document Object Model (DOM), which is basically web dev lingo for “how web pages work behind the scenes,” is something every web developer should have in their toolkit. It’s like the secret sauce that powers modern web development.

But why DOM? I recently stumbled upon a video of how browsers work and then dwelled into some articles and this is my under standing of the “why?”

Every browser works with a ** browser engine**,it is a core component of a web browser responsible for rendering web content, including HTML, CSS, and JavaScript, into a visual representation that users can interact with.

The “Document”: This term refers to a web page loaded into a web browser. It represents the structured hierarchy of the web page’s content, including elements such as headings, paragraphs, images, links, forms, and more. The DOM document is essentially an in-memory representation of the web page’s structure, created by the browser’s rendering engine when the page is loaded.

Now comes the interesting part of how the browser engine transforms the document into a node tree, which we know as the DOM for painting.

Well after downloading the document it is converted to raw data,yes, 0s and 1s.And this raw bytes of data is converted into characters.This conversion is done based on the character encoding of the HTML file.

These characters are further parsed into something called tokens.Alike any other programming language token can be defined as the smallest individual element of that programming language that is meaningful.Here token refers to the tags in HTML namely body,h1,h2,p,span etc.

Once tokenization is complete, the next step is to structure these tokens. This is where objects come into play.An object is created out of these tokens,these object contains a lot of information about each entities, including tag start, tag end, attributes, data/value, and more.

Now, we have a “Document” and “Objects”, but it’s still unstructured because there’s no relationship between these objects. After tokenization, these tokens are transformed into nodes. Each node will have a relationship with another, featuring parent, child, and sibling nodes. These node-to-node relationships form a familiar tree-like structure. This process is known as modeling the object tree.Now a node tree model is ready from the HTML document and ready to be painted.

To recap, the name “Document Object Model” reflects its purpose and function. It serves as a structured model for web page content, represented as a collection of objects. The name “DOM” emerged from the fusion of “Document” (the web page), “Object” (representing elements), and “Model” (the structured representation).

I hope this helps, and please feel free to provide any feedback or ask if you have any specific questions or concerns.

...

🔧 Deciphering the Origins: Why the DOM is called the DOM?


📈 71.36 Punkte
🔧 Programmierung

🔧 Deciphering the Origins: Why the DOM is called the DOM?


📈 71.36 Punkte
🔧 Programmierung

🪟 Ex-Cyberpunk devs forge new dark fantasy RPG called Dawnwalker: Origins


📈 26.22 Punkte
🪟 Windows Tipps

🕵️ Kèo Thẻ Phạt Vip66 Là Gì? 3 Lối Đánh Kèo Chậm Mà Chắc


📈 25.15 Punkte
🕵️ Reverse Engineering

🔧 KISS Principle: Giữ Mọi Thứ Đơn Giản Nhất Có Thể


📈 25.15 Punkte
🔧 Programmierung

🔧 Có thể bạn chưa biết (Phần 1)


📈 25.15 Punkte
🔧 Programmierung

🔧 Tìm Hiểu Về RAG: Công Nghệ Đột Phá Đang "Làm Mưa Làm Gió" Trong Thế Giới Chatbot


📈 25.15 Punkte
🔧 Programmierung

🪟 Gears 5 Operation 4 is called Brothers to the End and is bringing Dom


📈 22.05 Punkte
🪟 Windows Tipps

📰 Boom or Bust? Deciphering Mixed Messages on the Tech Job Market


📈 20.5 Punkte
📰 IT Security Nachrichten

🎥 Deciphering Data: Optimizing Data Communication to Maximize your ROI


📈 20.5 Punkte
🎥 Video | Youtube

📰 From Email to RAT: Deciphering a VBS Script-Driven Campaign


📈 20.5 Punkte
📰 IT Security Nachrichten

🔧 Government RFPs Deciphering and Responding Effectively


📈 20.5 Punkte
🔧 Programmierung

📰 Deciphering Between Incident Management and Crisis Management


📈 20.5 Punkte
📰 IT Security Nachrichten

📰 Deciphering the Attention Mechanism: Towards a Max-Margin Solution in Transformer Models


📈 20.5 Punkte
🔧 AI Nachrichten

🔧 Government RFPs Deciphering and Responding Effectively


📈 20.5 Punkte
🔧 Programmierung

💾 Deciphering The SWIFT-DRIDEX Relationship In Bank


📈 20.5 Punkte
💾 IT Security Tools

📰 Deciphering Auditory Processing: How Deep Learning Models Mirror Human Speech Recognition in the Brain


📈 20.5 Punkte
🔧 AI Nachrichten

📰 Deciphering Doubt: Navigating Uncertainty in LLM Responses


📈 20.5 Punkte
🔧 AI Nachrichten

📰 Deciphering the FISC’s Order on the Carter Page FISA Application


📈 20.5 Punkte
📰 IT Security Nachrichten

📰 Deciphering the 2023 Data Job Market: Do the Numbers Suggest Oversaturation or Opportunity?


📈 20.5 Punkte
🔧 AI Nachrichten

🔧 Buchbesprechung: Deciphering Data Architectures


📈 20.5 Punkte
🔧 Programmierung

📰 DeepMind AI Beats Humans At Deciphering Damaged Ancient Greek Tablets


📈 20.5 Punkte
📰 IT Security Nachrichten

📰 Deciphering Truth from Data: How Large Language Models Use Personas to Model Truthfulness


📈 20.5 Punkte
🔧 AI Nachrichten

📰 Buchbesprechung: Deciphering Data Architectures


📈 20.5 Punkte
📰 IT Nachrichten

📰 Deciphering the Pompeo-House Clash Over Witnesses


📈 20.5 Punkte
📰 IT Security Nachrichten

🔧 Deciphering the Digital Fortress: Next-Gen Data Security in 2024


📈 20.5 Punkte
🔧 Programmierung

📰 Deciphering The Net


📈 20.5 Punkte
📰 IT Security Nachrichten

🔧 Understanding the Difference Between GPT and LLM: Deciphering AI Language Models


📈 20.5 Punkte
🔧 Programmierung

📰 Deciphering Metrics: From NCAA Women’s Basketball to Cyber Trends


📈 20.5 Punkte
📰 IT Security Nachrichten

📰 Deciphering the Encryption Paradox


📈 20.5 Punkte
📰 IT Security Nachrichten