NavigationActivation:entry 属性

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

NavigationActivation 接口的 entry 只读属性包含一个 NavigationHistoryEntry 对象,该对象表示导航中传入(“目标”)的文档历史记录条目。这相当于传入文档被激活时的 Navigation.currentEntry 属性。

在某些情况下,fromentry NavigationHistoryEntry 对象不是 traverseTo() 方法的可行目标,因为它们可能不会保留在历史记录中。例如,可以使用 location.replace() 激活文档,或者可以使用 history.replaceState() 替换其初始条目。但是,这些条目的 url 属性和 getState() 方法仍然可以访问。

示例

查看 NavigationActivation 主页面。

规范

Specification
HTML
# dom-navigationactivation-entry

浏览器兼容性

BCD tables only load in the browser

参见