Back to Content

NavigationHistoryEntry: sameDocument property

files/en-us/web/api/navigationhistoryentry/samedocument/index.md

latest739 B
Original Source

{{APIRef("Navigation API")}}

The sameDocument read-only property of the {{domxref("NavigationHistoryEntry")}} interface returns true if this history entry is for the same document as the current {{domxref("Document")}} value and current document is fully active, or false otherwise.

Value

A boolean.

Examples

js
const current = navigation.currentEntry;
console.log(current.sameDocument);
// Will always return true

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also