-1

There are many question i saw on these concept still i have some doubts that's why asking specifically What is Browser object Model is this any object in javascript if it is how to access that object and what kind of properties it has someone please clarify exact definition of each

For example window is a global object created by Javascript engine

We can access it by

window 

when we say window we get following properties in console

window
Window {speechSynthesis: SpeechSynthesis, caches: CacheStorage, localStorage: Storage, sessionStorage: Storage, webkitStorageInfo: DeprecatedStorageInfo…}

When we say

 window.document
 #document<html>​<head>​

​</head>​<body>​…​</body>​<script src=​"app.js">​</script>​</body>​</html>​

Similar way what is BOM and DOM

Amin Soheyli
  • 605
  • 2
  • 7
  • 16
Vicky Kumar
  • 1,358
  • 1
  • 14
  • 26
  • [DOM](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model), [Document](https://developer.mozilla.org/en/docs/Web/API/Document) - and this answer http://stackoverflow.com/questions/4416317/what-is-the-dom-and-bom-in-javascript – Jaromanda X Nov 22 '16 at 04:47

4 Answers4

1

The BOM consists of the objects navigator, history, screen, location and document which are children of window. In the document node is the DOM, the document object model, which represents the contents of the page. You can manipulate it using javascript.

Reference

What is the DOM and BOM in JavaScript?

Community
  • 1
  • 1
Ashok Shah
  • 956
  • 12
  • 39
0

All browsers are split into different parts (objects) that can be accessed using Javascript. Collectively, these parts are known as the Browser Object Model, or the BOM. At the very top of this browser hierarchy is the Window object. This represents the entire browser, with its toolbars, menus, status bar, the page itself, and a whole lot more besides. Effectively, the Window IS the browser.

Every web page resides inside a browser window which can be considered as an object.

A Document object represents the HTML document that is displayed in that window. The Document object has various properties that refer to other objects which allow access to and modification of document content.

user3227262
  • 563
  • 1
  • 6
  • 16
0

BOM stands for Browser Object Model

DOM stands for Document Object Model

Document is a document object constructor

window is a scripting handle for window object

Bekim Bacaj
  • 5,707
  • 2
  • 24
  • 26
0

With Browser Object Model(window Object), you can:

  • Manipulate the browser window with the window object and things like scrolling, opening a new window, closing the current window, ..Etc.
  • Use the object document property to interact with the DOM.
  • Get the browser history with the history object.
  • Manipulate the screen with the screen object.
  • Get and do things with the location object.

With DOM you can:

  • Change an element text.
  • Change an HTML element color.
  • Hide and show elements
  • Make an HTML elements listen to an event