Document Object Model (DOM) topic

DOM (short for Document Object Model) 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.

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.

In HTML DOM (Document Object Model), every element is a node:

  • A document is a document node.
  • All HTML elements are element nodes.
  • All HTML attributes are attribute nodes.
  • Text inserted into HTML elements are text nodes.
  • Comments are comment nodes.

List Document Object Model (DOM) repositories

domhandler

322
Stars
62
Forks
Watchers

Handler for htmlparser2, to get a DOM

htmlparser2

4.3k
Stars
368
Forks
Watchers

The fast & forgiving HTML and XML parser

react-archer

1.1k
Stars
66
Forks
Watchers

🏹 Draw arrows between React elements 🖋

react-tilt

426
Stars
31
Forks
Watchers

Parallax tilt hover effect for React JS 🪄

DOMtastic

763
Stars
46
Forks
Watchers

Small, fast, and modular DOM and event library for modern browsers.

CSSOM

747
Stars
95
Forks
Watchers

Unmaintained! ⚠️ CSS Object Model implemented in pure JavaScript. Also, a CSS parser.

LunarLander

19
Stars
8
Forks
Watchers

A Sci-Fi Survival Shooter, made entirely using the DOM and JavaScript

svgdom

31
Stars
3
Forks
Watchers

Library to represent an SVG as a DOM.

emerj

62
Stars
5
Forks
Watchers

Emerj is a tiny JavaScript library to render live HTML/DOM updates efficiently and non-destructively, by merging an updated DOM with the live DOM, and only changing those elements that differ.

aight

756
Stars
98
Forks
Watchers

JavaScript shims and shams for making IE8-9 behave reasonably