JavaScript BOM (Browser Object Model) Introduction


Example

The BOM (Browser Object Model) contains objects that represent the current browser window and components; objects that model things like history, device's screen, etc

The topmost object in BOM is the window object, which represents the current browser window or tab. enter image description here

  • Document: represents current web page.
  • History: represents pages in browser history.
  • Location: represents URL of current page.
  • Navigator: represents information about browser.
  • Screen: represents device's display information.