Open juliandescottes opened 1 year ago
We previously had https://github.com/w3c/webdriver-bidi/issues/402 in which I suggested fragmentNavigated
should cover this use case. But APIs like pushState()
don't end up going through the navigation path in HTML and so aren't covered by that event as specified at present. So there are two options here:
fragmentNavigated
for anything that changes the position in the session history without changing the active document.The Browser Testing and Tools Working Group just discussed History navigation events
, and agreed to the following:
ACTION: David - Make sure agenda is ready ahead of time and organsie the remote participation links [1]
ACTION: Orkon - Collect these properties needed and put it in the issue with use cases of how people would use it [2]
Option #1 sounds good to me.
Option #2 would require some implementation effort on our side but if there is a use case that is currently not covered, it sounds good too.
speaking with my selenium hat on I think having a single event type is much easier DX for our users
sounds like a good argument for the option #1
The Browser Testing and Tools Working Group just discussed Session History
.
I'd suggest renaming the fragmentNavigated
event to something along the lines of sameDocumentNavigated
and doing (1). If the use-case arises that we need to separate history and fragment navigation. We can add a type to the navigation.
The exact location we would add this renamed event would be in https://html.spec.whatwg.org/#finalize-a-same-document-navigation
Removing or renaming an existing API disrupts our backward compatibility model with WebDriver. If we intend to introduce a new name such as sameDocumentNavigated
, we may need to retain frameNavigated
for the time being. We could consider marking it as deprecated and potentially remove it later once we are confident that clients have been updated?
Current browsingContext events only cover regular page navigation or fragment navigation (navigationStarted, fragmentNavigated, ...)
For parity with https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-navigatedWithinDocument we could also expose additional events for history API usage.