Navigation: currentEntry property
The currentEntry
read-only property of the Navigation
interface returns a NavigationHistoryEntry
object representing the location the user is currently navigated to right now.
Value
Examples
function initHomeBtn() {
const { key } = navigation.currentEntry;
backToHomeButton.onclick = () => {
navigation.traverseTo(key);
};
}
navigation.addEventListener("navigate", (event) => {
event.intercept({
async handler() {
},
});
});
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
currentEntry |
102 |
102 |
No |
No |
88 |
No |
102 |
102 |
No |
70 |
No |
19.0 |
See also