Navigation:activation 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Navigation
接口的 activation
只读属性返回一个 NavigationActivation
对象,其中包含有关最近跨文档导航的信息,该导航“激活”了此文档。该属性在同文档导航期间将保持不变。
值
NavigationActivation
对象,如果当前文档是初始 about:blank
文档,则为 null
。
示例
js
if (navigation.activation) {
console.log(navigation.activation.entry.url);
}
规范
Specification |
---|
HTML # dom-navigation-activation |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
activation |
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.
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
参见
- 现代客户端路由:导航 API
- 导航 API 说明
- Domenic Denicola 的导航 API 在线演示