-
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 `NavigationTransition.{from,navigationTy…
…pe}` (#24870)
- Loading branch information
1 parent
06c50a2
commit 6e87294
Showing
2 changed files
with
75 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: NavigationTransition:from 属性 | ||
slug: Web/API/NavigationTransition/from | ||
l10n: | ||
sourceCommit: ef75c1741b450c2331204be5563ee964ad5f4c48 | ||
--- | ||
|
||
{{APIRef("Navigation API")}}{{SeeCompatTable}} | ||
|
||
{{domxref("NavigationTransition")}} 接口的 **`from`** 只读属性返回导航过渡来源的 {{domxref("NavigationHistoryEntry")}}。 | ||
|
||
## 值 | ||
|
||
一个 {{domxref("NavigationHistoryEntry")}} 对象。 | ||
|
||
## 示例 | ||
|
||
```js | ||
console.log(navigation.transition.from); | ||
``` | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- [现代客户端路由:导航 API](https://developer.chrome.google.cn/docs/web-platform/navigation-api/) | ||
- [导航 API 说明](https://github.com/WICG/navigation-api/blob/main/README.md) | ||
- Domenic Denicola 的[导航 API 在线演示](https://gigantic-honored-octagon.glitch.me/) |
41 changes: 41 additions & 0 deletions
41
files/zh-cn/web/api/navigationtransition/navigationtype/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,41 @@ | ||
--- | ||
title: NavigationTransition:navigationType 属性 | ||
slug: Web/API/NavigationTransition/navigationType | ||
l10n: | ||
sourceCommit: ef75c1741b450c2331204be5563ee964ad5f4c48 | ||
--- | ||
|
||
{{APIRef("Navigation API")}}{{SeeCompatTable}} | ||
|
||
{{domxref("NavigationTransition")}} 接口的 **`navigationType`** 只读属性返回正在进行的导航的类型。 | ||
|
||
## 值 | ||
|
||
表示正在进行的导航类型的枚举值。 | ||
|
||
可能的值包括: | ||
|
||
- `push`:导航到新位置,导致将新条目推送到历史记录列表中。 | ||
- `reload`:重新加载 {{domxref("Navigation.currentEntry")}}。 | ||
- `replace`:用新的历史记录条目替换 {{domxref("Navigation.currentEntry")}}。此新条目将重用相同的 {{domxref("NavigationHistoryEntry.key", "key")}},但分配不同的 {{domxref("NavigationHistoryEntry.id", "id")}}。 | ||
- `traverse`:浏览器从一个现有历史记录条目导航到另一个现有历史记录条目。 | ||
|
||
## 示例 | ||
|
||
```js | ||
console.log(navigation.transition.navigationType); | ||
``` | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- [现代客户端路由:导航 API](https://developer.chrome.google.cn/docs/web-platform/navigation-api/) | ||
- [导航 API 说明](https://github.com/WICG/navigation-api/blob/main/README.md) | ||
- Domenic Denicola 的[导航 API 在线演示](https://gigantic-honored-octagon.glitch.me/) |