-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zh-cn]: add translation for `{Navigator,WorkerNavigator}.userAgentDa…
…ta` (#19198) Co-authored-by: A1lo <[email protected]>
- Loading branch information
1 parent
d5f2466
commit 1a35d70
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Navigator:userAgentData 属性 | ||
slug: Web/API/Navigator/userAgentData | ||
l10n: | ||
sourceCommit: 8ccdd482e4723b5393278bba686adc24d1769d0f | ||
--- | ||
|
||
{{securecontext_header}}{{APIRef("User-Agent Client Hints API")}}{{SeeCompatTable}} | ||
|
||
{{domxref("Navigator")}} 接口的 **`userAgentData`** 只读属性返回一个 {{domxref("NavigatorUAData")}} 对象,其可用于访问{{domxref("User-Agent Client Hints API", "用户代理客户端提示 API", "", "nocode")}}。 | ||
|
||
## 值 | ||
|
||
一个 {{domxref("NavigatorUAData")}} 对象。 | ||
|
||
## 示例 | ||
|
||
以下示例将 {{domxref("NavigatorUAData.brands")}} 的值打印到控制台。 | ||
|
||
```js | ||
console.log(navigator.userAgentData.brands); | ||
``` | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- [利用用户代理客户端提示改善用户隐私并提升开发者体验](https://developer.chrome.com/docs/privacy-security/user-agent-client-hints) |
34 changes: 34 additions & 0 deletions
34
files/zh-cn/web/api/workernavigator/useragentdata/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: WorkerNavigator:userAgentData 属性 | ||
slug: Web/API/WorkerNavigator/userAgentData | ||
l10n: | ||
sourceCommit: 8ccdd482e4723b5393278bba686adc24d1769d0f | ||
--- | ||
|
||
{{APIRef("User-Agent Client Hints API")}}{{SeeCompatTable}}{{securecontext_header}} | ||
|
||
{{domxref("WorkerNavigator")}} 接口的 **`userAgentData`** 只读属性返回一个 {{domxref("NavigatorUAData")}} 对象,其可用于访问{{domxref("User-Agent Client Hints API", "用户代理客户端提示 API", "", "nocode")}}。 | ||
|
||
## 值 | ||
|
||
一个 {{domxref("NavigatorUAData")}} 对象。 | ||
|
||
## 示例 | ||
|
||
以下示例将 {{domxref("NavigatorUAData.brands")}} 的值打印到控制台。 | ||
|
||
```js | ||
console.log(navigator.userAgentData.brands); | ||
``` | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- [利用用户代理客户端提示改善用户隐私并提升开发者体验](https://developer.chrome.com/docs/privacy-security/user-agent-client-hints) |