What is BOM?

What is BOM?

BOM stands for Browser Object Model. It consists of the objects: navigator, history, screen, location and document, all of which are children of window.

The primary function of BOM is to allow JavaScript to "talk to", i.e. communicate with the browser. Basically, it allows one to interact with the browser.

The default object of browser is window. This means that one can call all the functions of the window wither directly, or by specifying window.

For example:

window.alert("hello javatpoint"); 

would work the same as:

alert("hello javatpoint"); 

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.