-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Navigation.transition
(#24505)
- Loading branch information
1 parent
401797d
commit 50d4f37
Showing
4 changed files
with
47 additions
and
7 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
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
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
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,40 @@ | ||
--- | ||
title: Navigation:transition 属性 | ||
slug: Web/API/Navigation/transition | ||
l10n: | ||
sourceCommit: ef75c1741b450c2331204be5563ee964ad5f4c48 | ||
--- | ||
|
||
{{APIRef("Navigation API")}}{{SeeCompatTable}} | ||
|
||
{{domxref("Navigation")}} 接口的 **`transition`** 只读属性返回一个 {{domxref("NavigationTransition")}} 对象,该对象表示正在进行的导航的状态,可用于跟踪正在进行的导航。 | ||
|
||
## 值 | ||
|
||
{{domxref("NavigationTransition")}} 对象,如果当前没有正在进行的导航,则为 `null`。 | ||
|
||
## 示例 | ||
|
||
```js | ||
async function handleTransition() { | ||
if (navigation.transition) { | ||
showLoadingSpinner(); | ||
await navigation.transition.finished; | ||
hideLoadingSpinner(); | ||
} | ||
} | ||
``` | ||
|
||
## 规范 | ||
|
||
{{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/) |