This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
* Some parts of this feature may have varying levels of support.
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.locationbarThe browser location bar.
The browser menu bar.
Window.personalbarThe browser personal bar.
Window.scrollbarsThe browser scrollbars.
Window.statusbarThe browser status bar.
Window.toolbarThe browser toolbar.
The BarProp interface is not accessed directly, but via one of these elements.
BarProp.visible Read only
A Boolean, which is true if the bar represented by the used interface element is visible.
The following example prints a BarProp object to the console that represents the location bar.
console.log(window.locationbar);
| Specification |
|---|
| HTML> # barprop> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
BarProp |
1 | 12 | 1 | 15 | 3 | 18 | 4 | 14 | 1 | 1.0 | 4.4 | 1 |
visible |
1 | 12 | 1 | 15 | 3 | 18 | 4 | 14 | 1 | 1.0 | 4.4 | 1 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/BarProp