The BOM is the stage where your application performs. It provides the global context and tools for interacting with the browser itself.
1The Window: The Global Root
The window object is the apex of the browser's hierarchy. In a web browser, it is the global object—meaning any variable or function defined globally is actually a property of window. While the DOM (Document Object Model) focuses on the internal structure of the page, the BOM focuses on the container. Through the window object, you gain access to the viewport dimensions, timers like setTimeout, and critical sub-objects like location and navigator.
2Navigation & Metadata
The BOM is composed of several specialized objects. Location is used for URL manipulation, allowing for programmatic redirects and reloads. History provides a restricted interface to the user's session navigation, enabling custom back/forward buttons. Navigator provides 'browser fingerprints' and state information (like battery level or connectivity), while Screen helps you understand the physical constraints of the user's hardware display.
