NavigatorUAData:brands 属性

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

备注: 此特性在 Web Worker 中可用。

NavigatorUAData 接口的 brands 只读属性返回一个包含品牌信息的数组。

一个包含每个品牌如下信息的数组:

brand

一个包含品牌的字符串。例如,"Google Chrome"

version

一个包含版本的字符串。例如,"91"

示例

以下示例将 brands 的值打印到控制台。

js
console.log(navigator.userAgentData.brands);

规范

Specification
User-Agent Client Hints
# dom-navigatoruadata-brands

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
brands
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

参见