Repository navigation

#

Document Object Model (DOM)

Created by World Wide Web Consortium

发布于 October 1, 1998

whatwg/dom
dom.spec.whatwg.org
维基百科

相关主题

HTMLXML

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.
preactjs/preact

⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.

JavaScript
37879
7 小时前
TypeScript
31474
1 年前

The fast, flexible, and elegant library for parsing and manipulating HTML and XML.

TypeScript
29695
13 小时前

DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:

JavaScript
15707
4 天前
JavaScript
13671
11 小时前
QwikDev/partytown

Relocate resource intensive third-party scripts off of the main thread and into a web worker. 🎉

TypeScript
13450
1 个月前
jhy/jsoup

jsoup: the Java HTML parser, built for HTML editing, cleaning, scraping, and XSS safety.

Java
11233
16 小时前

Generates an image from a DOM node using HTML5 canvas

JavaScript
10678
1 年前
JavaScript
6765
6 年前

✂️ Generates an image from a DOM node using HTML5 canvas and SVG.

TypeScript
6626
2 个月前

The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.

JavaScript
6603
5 年前
phuocng/html-dom

Common tasks of managing HTML DOM with vanilla JavaScript. Give me 1 ⭐if it’s useful.

MDX
6567
1 年前
JavaScript
6455
6 天前

Morph DOM elements from one state to another with smooth animations and transitions

JavaScript
5444
9 年前

snapDOM captures HTML elements to images with exceptional speed and accuracy.

JavaScript
5425
1 天前

👼 The ultimate angle brackets parser library parsing HTML5, MathML, SVG and CSS to construct a DOM based on the official W3C specifications.

C#
5371
1 个月前