InterviewHubPRO
Section Overview
Q110

Question 110 of 521

Part 3: DOM, Event Flow, Timers & Browser APIs (104 - 173)

21%
JavaScript Internals (521 Qs)•Part 3: DOM, Event Flow, Timers & Browser APIs (104 - 173)

What is BOM

The Browser Object Model (BOM) allows JavaScript to "talk to" the browser. It consists of the objects navigator, history, screen, location and document which are children of the window. The Browser Object Model is not standardized and can change based on different browsers.

Screenshot

Practical Code Example

javascript
// Browser Object Model (BOM) exposes browser window capabilities:
console.log(window.navigator.userAgent); // Browser identity
console.log(window.screen.width);        // Physical screen resolution
console.log(window.location.href);       // URL manipulation
console.log(window.history.length);      // Session history stack