You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I started trying to spec event.destination, I realized making it an AppHistoryEntry would not work very well. In particular, only sometimes would we be able to get the right object identity, i.e. the one that matches up with appHistory.entries() or appHistory.current after the navigation. And, adding event listeners doesn't make much sense. And, the semantics of index were strange.
So we should definitely divorce event.destination from the AppHistoryEntry instances that live in appHistory.entries(), and instead make it a more abstraction representation of the destination. I think reusing much of the AppHistoryEntry properties makes sense, but I have some questions for each of them:
url: OK, well, this is still obvious
getState(): this seems fine and useful to include
key: For push navigations, should key be the future key, or should it maybe be null? This is clearly a must for traverse navigations, and is easy to compute for replace navigations.
id: should this even be included? Is it useful to make the browser figure this out early?
index: a few options...
Don't include this
-1 for push navigations, accurate index for other navigations
appHistory.current.index + 1 for push navigations, accurate index for other navigations
sameDocument: If you call event.respondWith(), should this change, or should it always reflect the "original" navigation? (AppHistoryEntry.sameDocument #70)
As I started trying to spec event.destination, I realized making it an
AppHistoryEntrywould not work very well. In particular, only sometimes would we be able to get the right object identity, i.e. the one that matches up withappHistory.entries()orappHistory.currentafter the navigation. And, adding event listeners doesn't make much sense. And, the semantics ofindexwere strange.So we should definitely divorce
event.destinationfrom theAppHistoryEntryinstances that live inappHistory.entries(), and instead make it a more abstraction representation of the destination. I think reusing much of theAppHistoryEntryproperties makes sense, but I have some questions for each of them:url: OK, well, this is still obviousgetState(): this seems fine and useful to includekey: For push navigations, shouldkeybe the future key, or should it maybe benull? This is clearly a must for traverse navigations, and is easy to compute for replace navigations.id: should this even be included? Is it useful to make the browser figure this out early?index: a few options...-1for push navigations, accurate index for other navigationsappHistory.current.index + 1for push navigations, accurate index for other navigationssameDocument: If you callevent.respondWith(), should this change, or should it always reflect the "original" navigation? (AppHistoryEntry.sameDocument #70)