BarProp:visible 属性
Baseline Widely available *
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.
BarProp
接口的 visible
只读属性在它所表示的用户界面元素的条可见的情况下返回 true
。
值
一个布尔值,如果顶层窗口是用启用了 popup
特性的 window.open
打开的,则为 true
。
备注: 历史上,这个接口元素被用来表示是否可见,但由于隐私原因,不再表示每个接口元素实际的可见性。
示例
如果窗口不是弹出窗口,则下面的示例将 true
打印到控制台。
js
console.log(window.locationbar.visible);
规范
Specification |
---|
HTML # dom-barprop-visible |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
visible | ||||||||||||
Returns true for non-popup windows |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.