NavigationDestination: index-Eigenschaft
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimentell: Dies ist eine experimentelle Technologie
Überprüfen Sie die Browser-Kompatibilitätstabelle sorgfältig vor der Verwendung auf produktiven Webseiten.
Die index
-Schreibgeschützte Eigenschaft der NavigationDestination
-Schnittstelle gibt den index
-Wert des Ziel-NavigationHistoryEntry
zurück, wenn der NavigateEvent.navigationType
traverse
ist, oder -1
sonst.
Wert
Eine Zahl, die den index
des Ziel-NavigationHistoryEntry
darstellt, oder -1.
Beispiele
navigation.addEventListener("navigate", (event) => {
console.log(event.destination.index);
});
Spezifikationen
Specification |
---|
HTML # the-navigationdestination-interface:dom-navigationdestination-index-2 |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
index |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- See implementation notes.