Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify WebDriver BiDi about "committed" navigations #10910

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

OrKoN
Copy link
Contributor

@OrKoN OrKoN commented Jan 13, 2025

This PR adds integration with the WebDriver BiDi spec to notify automation sessions when a navigation results in a new document being loaded. See w3c/webdriver-bidi#788 and w3c/webdriver-bidi#855.

(See WHATWG Working Mode: Changes for more details.)


/browsing-the-web.html ( diff )
/infrastructure.html ( diff )

Copy link

@sadym-chromium sadym-chromium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OrKoN OrKoN force-pushed the orkon/navigation-comitted branch from cfad3b6 to 7641acb Compare January 14, 2025 16:07
@OrKoN OrKoN marked this pull request as ready for review January 15, 2025 11:36
@jgraham
Copy link
Member

jgraham commented Jan 15, 2025

So in 6.4.1 in attempt to populate the history entry's document (covering the case of navigating to a document without a DOM) seems to run a the navigation failed steps (and so emits a navigation failed event), but the document isn't null in that case so we'll still send the navigation committed event in 7.4. Possibly we need to move emitting this event up into step 6?

@OrKoN
Copy link
Contributor Author

OrKoN commented Jan 15, 2025

So in 6.4.1 in attempt to populate the history entry's document (covering the case of navigating to a document without a DOM) seems to run a the navigation failed steps (and so emits a navigation failed event), but the document isn't null in that case so we'll still send the navigation committed event in 7.4. Possibly we need to move emitting this event up into step 6?

Thanks for spotting this. On one hand there is a new document committed by the navigation (that might be relevant for the client), on the other hand the events get confusing (failed, then committed) and IIUC this is about error pages where the only useful action is to reload. I guess moving to 6 would be an option or checking saveExtraDocumentState or document's salvageable state.

@OrKoN OrKoN closed this Jan 16, 2025
@OrKoN OrKoN reopened this Jan 16, 2025
@OrKoN OrKoN force-pushed the orkon/navigation-comitted branch 3 times, most recently from 47c48ab to 5ac7342 Compare January 16, 2025 08:43
@OrKoN OrKoN force-pushed the orkon/navigation-comitted branch from 5ac7342 to 80caa5a Compare January 16, 2025 08:44
@OrKoN
Copy link
Contributor Author

OrKoN commented Jan 16, 2025

Moved to step 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants