Skip to content

Commit dd09c4c

Browse files
authored
Add topic "DOM"
1 parent 74262cf commit dd09c4c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

topics/dom/index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
aliases: dom-tree, dom-node, dom-element, dom-elements
3+
created_by: World Wide Web Consortium
4+
display_name: Document Object Model (DOM)
5+
github_url: https://github.com/whatwg/dom
6+
released: October 1, 1998
7+
short_description: DOM is a cross-platform and language-independent interface that treats an HTML or XML document as a tree structure.
8+
topic: dom
9+
url: https://dom.spec.whatwg.org/
10+
wikipedia_url: https://en.wikipedia.org/wiki/Document_Object_Model
11+
related: shadow-dom, virtual-dom, html, xml, dhtml
12+
---
13+
**DOM** (short for **D**ocument **O**bject **M**odel) is a cross-platform and language-independent interface that treats an HTML or XML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document. Nodes can have event handlers (also known as event listeners) attached to them. Once an event is triggered, the event handlers get executed.
14+
15+
The principal standardization of the DOM was handled by the World Wide Web Consortium (W3C), which last developed a recommendation in 2004. WHATWG took over the development of the standard, publishing it as a living document. The W3C now publishes stable snapshots of the WHATWG standard.
16+
17+
In HTML DOM (Document Object Model), every element is a node:
18+
* A document is a document node.
19+
* All HTML elements are element nodes.
20+
* All HTML attributes are attribute nodes.
21+
* Text inserted into HTML elements are text nodes.
22+
* Comments are comment nodes.

0 commit comments

Comments
 (0)