BarProp
The BarProp interface of the Document Object Model represents the web browser user interface elements that are exposed to scripts in web pages. Each of the following interface elements are represented by a BarProp object.
Window.locationbar
The browser location bar.
Window.menubar
The browser menu bar.
Window.personalbar
The browser personal bar.
Window.scrollbars
The browser scrollbars.
Window.statusbar
The browser status bar.
Window.toolbar
The browser toolbar.
The BarProp interface is not accessed directly, but via one of these elements.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 1 | 12 | 1 | 3 | 18 | 1 | |
| The visible read-only property of the BarProp interface returns true if the user interface element it represents is visible. | 1 | 12 | 1 | 3 | 18 | 1 |
visible (returns popup) Returns `true` for non-popup windows | 98 | 98 | 96 | | 98 | |
| Returns the locationbar object. | 1 | 12 | 1 | 3 | 18 | 1 |
| Returns the menubar object. | 1 | 12 | 1 | 3 | 18 | 1 |
| Returns the personalbar object. | 1 | 12 | 1 | 3 | 18 | 1 |
| Returns the scrollbars object. | 1 | 12 | 1 | 3 | 18 | 1 |
| Returns the statusbar object. | 1 | 12 | 1 | 3 | 18 | 1 |
| Returns the toolbar object. | 1 | 12 | 1 | 3 | 18 | 1 |
Syntax
console.log(window.locationbar); Use cases
-
Using BarProp
The BarProp interface of the Document Object Model represents the web browser user interface elements that are exposed to scripts in web pages.
Cautions
- May not be supported in older browsers.
Implementation notes
- Some APIs require a secure context (HTTPS) or user activation. Check the requirements before use.