NavigationHistoryEntry: sameDocument property

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.

Thuộc tính chỉ đọc sameDocument của giao diện NavigationHistoryEntry trả về true nếu mục lịch sử này thuộc cùng document với giá trị Document hiện tại và tài liệu hiện tại đang hoạt động đầy đủ, ngược lại trả về false.

Giá trị

Một giá trị boolean.

Ví dụ

js
const current = navigation.currentEntry;
console.log(current.sameDocument);
// Sẽ luôn trả về true

Thông số kỹ thuật

Thông số kỹ thuật
HTML
# dom-navigationhistoryentry-samedocument-dev

Tương thích trình duyệt

Xem thêm