What is the DOM and specification in JavaScript?

What is the DOM and specification in JavaScript? If someone could explain this to lay people, that would be great! I like to understand them more deeply.

+81
javascript dom javascript-events dom-events
Dec 11 '10 at
source share
8 answers

The BOM (browser object model) consists of the navigator , history , screen , location and document objects, which are children of the window . The document node contains the DOM (Document Object Model), the document object model that represents the contents of the page. You can manipulate it with javascript.

+131
Dec 11 '10 at 10:44
source share
  • DOM - Document Object Model
  • BOM - Browser Object Model

This article explains the relationship between Javascript, the DOM, and the specification.

+44
Dec 11 2018-10-11
source share

These are just different objects you deal with:

  • The DOM is the Document object model that relates to the document, the HTML elements themselves, for example. document and all the crawls you could do in it, events, etc.
  • A specification is a Browser Object Model that deals with browser components other than a document, such as history , location , navigator and screen (as well as some others that are browser dependent).
+35
Dec 11 '10 at
source share
+4
Mar 07 '14 at 10:04
source share

DOM means the model of the document object. When a web page loads, the browser creates a document object model for the page. All objects are arranged in a tree structure ...

BOM means that the Object Browser Object Model.window is supported by all browsers that it represents a window browser. All global JavaScript objects, functions, and variables automatically become members of the window object.

+4
Mar 16 '16 at 11:27
source share

DOM β†’ The document object model in JavaScript is an API for accessing elements inside a document. It maps the entire document to a hierarchy of parent and child trees. Each node can contain the number of children, or it can inherit another parent in some way or another.

BOM β†’ The browser object model is a larger view of all the browser provided, including the current document, location, history, frames, and any other functions that the browser can provide JavaScript. The browser object model is not standardized and may vary depending on different browsers.

+2
Dec 02 '18 at 23:12
source share

HOUSE: A document object represents an entire HTML document. When an HTML document is loaded into the browser, it becomes the object of the document.

Specification: A window object represents a window in a browser. A window object is automatically created by the browser.

+2
Apr 03 '19 at 3:09
source share

BOM stands for Browser Object Model. These are objects that you can use to control your browser. they are a navigator

  • navigator
  • screen
  • location
  • story
  • document

they are all children of the Window object. The DOM is a document object model that is part of the specification and helps you manage the contents of the loaded page file. this includes HTML and CSS

+1
Jan 17 '18 at 13:12
source share



All Articles