diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/performancenavigation | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/performancenavigation')
-rw-r--r-- | files/zh-cn/web/api/performancenavigation/index.html | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/performancenavigation/index.html b/files/zh-cn/web/api/performancenavigation/index.html new file mode 100644 index 0000000000..ccd6816faf --- /dev/null +++ b/files/zh-cn/web/api/performancenavigation/index.html @@ -0,0 +1,76 @@ +--- +title: PerformanceNavigation +slug: Web/API/PerformanceNavigation +translation_of: Web/API/PerformanceNavigation +--- +<p>{{APIRef("Navigation Timing")}}</p> + +<h2 id="Summary">Summary</h2> + +<p><strong><code>PerformanceNavigation</code></strong><code>接口呈现了如何导航到当前文档的信息。</code></p> + +<p>这个类型的对象可以被只读属性{{domxref("Performance.navigation")}}调用。</p> + +<h2 id="Properties">Properties</h2> + +<p><em><code>PerformanceNavigation</code> 接口不继承任何属性。</em></p> + +<dl> + <dt>{{domxref("PerformanceNavigation.type")}} {{readonlyInline}}</dt> + <dd>一个无符号短整型,表示是如何导航到这个页面的。可能的值如下: + <dl> + <dt><code>TYPE_NAVIGATE</code> (0)</dt> + <dd>当前页面是通过点击链接,书签和表单提交,或者脚本操作,或者在url中直接输入地址,type值为0</dd> + <dt><code>TYPE_RELOAD</code> (1)</dt> + <dd>点击刷新页面按钮或者通过{{domxref("Location.reload()")}}方法显示的页面,type值为1</dd> + <dd>The page was accessed by clicking the Reload button or via the {{domxref("Location.reload()")}} method.</dd> + <dt><code>TYPE_BACK_FORWARD</code> (2)</dt> + <dd>页面通过历史记录和前进后退访问时。type值为2</dd> + <dt><code>TYPE_RESERVED</code> (255)</dt> + <dd>任何其他方式,type值为255</dd> + </dl> + </dd> + <dt>{{domxref("PerformanceNavigation.redirectCount")}} {{readonlyInline}}</dt> + <dd>无符号短整型,表示在到达这个页面之前重定向了多少次。</dd> +</dl> + +<h2 id="Methods">Methods</h2> + +<p><em><em><code>Performance</code> 接口没有继承任何方法</em></em></p> + +<dl> + <dt>{{domxref("PerformanceNavigation.toJSON()")}} {{non-standard_inline}}</dt> + <dd>把<code>PerformanceNavigation</code>转换成JSON对象</dd> +</dl> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('Navigation Timing', '#sec-navigation-info-interface', 'PerformanceNavigation')}}</td> + <td>{{Spec2('Navigation Timing')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + +<div> + + +<p>{{Compat("api.PerformanceNavigation")}}</p> +</div> + +<h2 id="See_also">See also</h2> + +<ul> + <li>The {{domxref("Performance")}} that allows access to an object of this type.</li> + <li>{{domxref("PerformanceNavigationTiming")}} (part of Navigation Timing Level 2) {{experimental_inline}}</li> +</ul> |