DOM (Document Object Model)
The DOM is a language- and platform neutral interface that allows programs and scripts to dynamically access and update the content and structure of documents.
One can access each element and it’s properties using the DOM structure. This model describes how the element inherits the property of another element.
DOM has following level of abstractions
- DOM level 1 The level one of DOM consist of two modules
- DOM Core: It maps the XML-based document and gives the access to user to manipulate and read any part of the document
- DOM HTML: This module extends the core by adding HTML specific objects and methods.
- DOM level 2 has new modules deal with the new types of interfaces
- DOM Views: Tracks different views of document such as, how the document should appear before and after applying the styles.
- DOM Events: It interfaces the event to the documents elements
- DOM Styles: This interface the styling to the document
- DOM traverse and Range: DOM traversing provides the way to modify or add new element into the DOM hierarchy.
- DOM level 3 The level three of DOM abstracts the methods to validate the document, DOM validation. The level three fully supports the XML 1.0 which inclues infoset, XPath and XML base.
- Other abstraction of DOM
- Scalable Vector Graphics (SVG)
- Mathematics Markup language (MathML)
- Synchronized Multimedia Integration Language (SMIL)
- Canvas in HTML5
BOM (Browser Object Model)
This is an informal term as there is no W3C or WHATWG standard that mentions it.
One simple definition would be that the BOM encompasses the entire object structure which is accessible via scripting in the browser, beginning with the
window object which “contains everything else”, since it’s the global object.
window object contains lots of properties (try
console.dir( window );). These properties are specified in numerous web-standards. The “core” specification of the
window object is as of now still specified in the HTML standard – see here, but I guess it’s only a matter of time until the editors decide to transfer this specification into a separate standard.
Since DOM is one of the object of BOM, DOM is the child of BOM and they relate to each other. One can access document by simple writing