NavigationActivation:entry 属性
Baseline
2026
Newly available
Since January 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
NavigationActivation 接口的 entry 只读属性包含一个 NavigationHistoryEntry 对象,该对象表示导航中传入(“目标”)的文档历史记录条目。这相当于传入文档被激活时的 Navigation.currentEntry 属性。
在某些情况下,from 或 entry NavigationHistoryEntry 对象不是 traverseTo() 方法的可行目标,因为它们可能不会保留在历史记录中。例如,可以使用 location.replace() 激活文档,或者可以使用 history.replaceState() 替换其初始条目。但是,这些条目的 url 属性和 getState() 方法仍然可以访问。