1. 面向开发者的 Web 技术
  2. Web API
  3. NavigationHistoryEntry
  4. NavigationHistoryEntry:sameDocument 属性

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

NavigationHistoryEntry:sameDocument 属性

Limited availability

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

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

NavigationHistoryEntry 接口的 sameDocument 只读属性在此历史记录条目与当前 Document 值属于同一 document 且当前文档完全处于活动状态时返回 true,否则返回 false

布尔值。

示例

js
const current = navigation.currentEntry;
console.log(current.sameDocument);
// 总是返回 true

规范

Specification
HTML
# dom-navigationhistoryentry-samedocument-dev

浏览器兼容性

参见

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /