Skip to content

[Editorial review] BiDi - Add pages for browser module commands#43518

Open
dipikabh wants to merge 5 commits intomdn:mainfrom
dipikabh:bidi-browser
Open

[Editorial review] BiDi - Add pages for browser module commands#43518
dipikabh wants to merge 5 commits intomdn:mainfrom
dipikabh:bidi-browser

Conversation

@dipikabh
Copy link
Copy Markdown
Contributor

Description

This PR adds the following pages:

  • browser.close
  • browser.createUserContext
  • browser.getClientWindows
  • browser.getUserContexts
  • browser.removeUserContext

Note:
Since support is mixed right now, I'll add pages for browser.setClientWindowState and browser.setDownloadBehavior in a future PR.

Additional details

The browser landing page includes two new sections:

  • User contexts
  • Client windows

These can likely by moved to a guide in the future.

Spec links

Related issue

Doc issue: mdn/mdn#339

@dipikabh dipikabh requested a review from a team March 22, 2026 17:56
@dipikabh dipikabh requested review from a team as code owners March 22, 2026 17:56
@dipikabh dipikabh requested review from hamishwillee and pepelsbey and removed request for a team March 22, 2026 17:56
@github-actions github-actions bot added the Content:WebDriver WebDriver docs label Mar 22, 2026
@github-actions github-actions bot added the size/l [PR only] 501-1000 LoC changed label Mar 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 22, 2026

Preview URLs (8 pages)

Flaws (2)

Note! 6 documents with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser
Title: browser module
Flaw count: 1

  • broken_links:
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/setClientWindowState doesn't resolve

URL: /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/getClientWindows
Title: browser.getClientWindows command
Flaw count: 1

  • broken_links:
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/setClientWindowState doesn't resolve

(comment last updated: 2026-03-26 15:38:33)

Copy link
Copy Markdown
Contributor

@juliandescottes juliandescottes left a comment

Choose a reason for hiding this comment

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

Just one question/suggestion regarding user contexts, but this looks very accurate, thanks!


## User contexts

A user context is a collection of zero or more top-level contexts (tabs) within the browser. Tabs within the same user context share the same browser storage (such as cookies and session data), while tabs in different user contexts are completely isolated from one another and do not share any browser data. A user context with no tabs is called an empty user context.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it make sense to give examples of practical implementations of user contexts in browsers (containers in Firefox, private browsing mode in Chrome), or is it too implementation/vendor specific?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea - it's what helped me understand what a user context is, though I think a guide might be a better place to include the examples. I've made a note.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Mar 24, 2026
Copy link
Copy Markdown
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

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

Thank you @dipikabh! Nice to see that we can as well nearly fully add the browser module. There are inline comments but as well merge conflicts listed which requires a new revision of this PR.


- [`invalid argument`](/en-US/docs/Web/WebDriver/Reference/Errors/InvalidArgument)
- : The `userContext` field is `"default"`. The default user context cannot be removed.
- `no such user context`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The specific error entry should probably be added now and as well linkified.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For now, I'm trying to prioritize modules, commands, and events that are being tracked in various spreadsheets.
But I want to definitely get to error and capability pages as well!

Added this one to my To-Do list so it's not lost. 🙂

@dipikabh
Copy link
Copy Markdown
Contributor Author

Thanks for the review @whimboo and @juliandescottes!

Please take another look when you get a chance.

@dipikabh dipikabh requested a review from whimboo March 26, 2026 15:43
Copy link
Copy Markdown
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

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

Thanks for the updates! It looks good to me as well.

@dipikabh
Copy link
Copy Markdown
Contributor Author

Thanks @whimboo!

@dipikabh dipikabh changed the title [Technical review] BiDi - Add pages for browser module commands [Editorial review] BiDi - Add pages for browser module commands Mar 26, 2026
@dipikabh dipikabh requested a review from pepelsbey March 26, 2026 23:35
@dipikabh
Copy link
Copy Markdown
Contributor Author

Hi @pepelsbey, would appreciate an editorial review from you. Thanks!

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

Labels

Content:WebDriver WebDriver docs size/l [PR only] 501-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants