document_object_model_dom

Document Object Model (DOM)

Return to JavaScript glossary or JavaScript

DOM is a cross-platform and language-independent application programming interface

“The DOM (Document Object Model) is an API that represents and interacts with any HTML or XML document. The DOM is a document model loaded in the browser and representing the document as a node tree, where each node represents part of the document (e.g. an element, text string, or comment).

The DOM is one of the most-used APIs on the Web because it allows code running in a web browser to access and interact with every node in the document. Nodes can be created, moved and changed. Event listeners can be added to nodes and triggered on occurrence of a given event.

DOM was not originally specified—it came about when browsers began implementing JavaScript. This legacy DOM is sometimes called DOM 0. Today, the WHATWG maintains the DOM Living Standard.”

Fair Use Source: https://developer.mozilla.org/en-US/docs/Glossary/DOM

Snippet from Wikipedia: Document Object Model

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

YouTube Videos

GitHub Tags

External Sites

Main

  • dom

Interesting Articles

Support Resources, FAQs, Q&A, Docs, Blogs

Search Engines

Repos and Registries

Courses

Books

Vidcasts-Podcasts


Cloud Monk is Retired (for now). Buddha with you. © 2024 Losang Jinpa or Fair Use. Disclaimers. REPLACE with: navbar_footer


document_object_model_dom.txt · Last modified: 2024/05/01 03:58 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki