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.

A diff for DOM elements, as client-side JavaScript code. Gets all modifications, insertions and removals between two DOM fragments.

HTML
830
9 个月前

Easily navigate the DOM and highlight the elements - http://720kb.github.io/highlighter.js/

HTML
384
7 年前

Track the position of DOM elements. Create cool animations.

JavaScript
341
8 年前

execute callbacks when dom elements appear in and out of view

HTML
178
5 年前

Ellipsis.js - Pure Javascript Library to handle complex multilines ellipsis

JavaScript
134
1 年前

Fairway Tech ဆော့ဗ်ဝဲအင်ဂျင်နီယာကျောင်းသားများအတွက်

JavaScript
41
2 年前
JavaScript
38
1 年前
JavaScript
21
5 年前

jQuery Plugin to Clone HTML DOM element without needed doing it yourself, this plugin will take care of everything. Just seat and drink coffee!

JavaScript
14
6 年前

Detect the appearance of an element in the browser DOM

TypeScript
14
2 天前

A Virtual DOM algorithm implementation that improves front end performance by updating only changed nodes in the DOM.

JavaScript
13
5 年前

Formation is a JavaScript library for validating HTML forms. Simply add it to your HTML page with a script tag, set up your DOM, and Formation handles the rest. Add custom events for validation state changes on both the form or individual elements, and create and use your own custom validation rules. No dependencies!

JavaScript
10
5 年前

🐹 Scrolley: Extra scroll event listeners for DOM Elements!

JavaScript
7
6 年前

🐡 Resizey: Resize event listeners on DOM Elements!

JavaScript
7
6 年前

A module for testing if a DOM element is visible in the viewport. Trigger callbacks are provided, as well as a configuration for surface trigger area.

JavaScript
5
7 年前

doc.js is a small library to manipulate the DOM in any browser. We focused on the most used and common use cases to create this. This library uses amd structure.

HTML
5
4 年前