[Tech review] BiDi - Add pages for navigation and page load events of browsingContext module#44571
[Tech review] BiDi - Add pages for navigation and page load events of browsingContext module#44571dipikabh wants to merge 5 commits into
Conversation
| - `userContext` {{optional_inline}} | ||
| - : A string that contains the ID of the [user context](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser#user_contexts) in which the HTML document is being parsed. |
There was a problem hiding this comment.
I was thinking to leave this field out, but I noticed in the implementation tracker that Firefox support is coming in 154. So I've included it, though examples of all events in this PR are currently missing this field.
I would have asked for clarification on when this field is included vs. omitted in the payload - but from the comment in the spreadsheet, it seems that this field will eventually become required.
But let me know, if in the meantime, any more details need to be added here
| ```json | ||
| { | ||
| "type": "event", | ||
| "method": "browsingContext.navigationFailed", | ||
| "params": { | ||
| "context": "5e5e96e8-5247-4f22-9b35-a4a2d841cbaa", | ||
| "navigation": "a1b2c3d4-5678-90ab-cdef-1234567890ab", | ||
| "timestamp": 1712345678901, | ||
| "url": "https://not-a-valid-domain.example" | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
I wasn't able to reproduce this. I used https://not-a-valid-domain.example as the URL but this returned:
"error": "unknown error",
"message": "Error: NS_ERROR_UNKNOWN_HOST",
as a browsingContext.navigate command error rather than firing the browsingContext.navigationFailed event. The stacktrace showed #onNavigationCommitted being called.
Is the example documented here good enough? Any other variables I can tweak to trigger the event?
Description
This PR adds pages for the following navigation and page load events:
browsingContext.navigationStartedbrowsingContext.navigationCommittedbrowsingContext.domContentLoadedbrowsingContext.loadbrowsingContext.navigationFailedbrowsingContext.fragmentNavigatedbrowsingContext.historyUpdatedNote
browsingContext.navigationAbortedis not documented yet. The BCD key is also missing for this event. I'll cover it when there is an implementation.Spec links
Related issue
Doc issue: mdn/mdn#339