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 GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
activation
Experimental

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.

参见