BOM and DOM – an overview

The JavaScript code in a page has access to a number of objects. These objects can be divided into the following types:

  • Core ECMAScript objects: All the objects mentioned in the previous chapters
  • DOM: Objects that have to do with the currently loaded page (the page is also called the document)
  • BOM: Objects that deal with everything outside the page (the browser window and the desktop screen)

DOM stands for Document Object Model and BOM for Browser Object Model.

The DOM is a standard, governed by the World Wide Web Consortium (W3C) and has different versions, called levels, such as DOM Level 1, DOM Level 2, and so on. Browsers in use today have different degrees of compliance with the standard but in general, they almost all ...

Get JavaScript : Object-Oriented Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.