Skip to content

[Editorial review] BiDi - Add pages for browsingContext module, part 1: context lifecycle commands#44121

Merged
dipikabh merged 6 commits into
mdn:mainfrom
dipikabh:bidi-browsingcontext-1
Jun 3, 2026
Merged

[Editorial review] BiDi - Add pages for browsingContext module, part 1: context lifecycle commands#44121
dipikabh merged 6 commits into
mdn:mainfrom
dipikabh:bidi-browsingcontext-1

Conversation

@dipikabh

Copy link
Copy Markdown
Contributor

Description

This PR adds the first set of pages related to the context life cycle:

  • browsingContext.create
  • browsingContext.close
  • browsingContext.activate

In addition:

  • Updated the browsingContext module landing page to include a section to explain top-level and child contexts.
  • Also updated the browser module landing page to include an example to explain user context vs client window.

Spec links

Related issue

Doc issue: mdn/mdn#339

@dipikabh dipikabh requested a review from a team May 14, 2026 12:39
@dipikabh dipikabh requested review from a team as code owners May 14, 2026 12:39
@dipikabh dipikabh requested review from pepelsbey and removed request for a team May 14, 2026 12:39
@github-actions github-actions Bot added the Content:WebDriver WebDriver docs label May 14, 2026
@dipikabh dipikabh removed request for a team and pepelsbey May 14, 2026 12:40
@github-actions github-actions Bot added the size/m [PR only] 51-500 LoC changed label May 14, 2026
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor
Preview URLs (14 pages)
Flaws (31)

Note! 4 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: 2

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

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

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

URL: /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/activate
Title: browsingContext.activate command
Flaw count: 2

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

URL: /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/close
Title: browsingContext.close command
Flaw count: 4

  • broken_links:
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/contextDestroyed doesn't resolve

URL: /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/create
Title: browsingContext.create command
Flaw count: 5

  • broken_links:
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/contextCreated doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/contextDestroyed doesn't resolve

URL: /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/input/fileDialogOpened
Title: input.fileDialogOpened event
Flaw count: 1

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

URL: /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/input/performActions
Title: input.performActions command
Flaw count: 7

  • broken_links:
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/locateNodes doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/script/evaluate doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/script/callFunction doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree doesn't resolve
    • and 2 more flaws omitted

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

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

URL: /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/input/setFiles
Title: input.setFiles command
Flaw count: 6

  • broken_links:
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/locateNodes doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/script/evaluate doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/script/callFunction doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/locateNodes doesn't resolve
    • and 1 more flaws omitted

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

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

(comment last updated: 2026-06-02 21:23:43)

@juliandescottes juliandescottes left a comment

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.

Still need to finish the review, but I spotted a potential spec & implementation issue with userContext in the return value for browsingContext.create so I'll submit comments while I'm filing the spec & implementation bugs.

Comment thread files/en-us/web/webdriver/reference/bidi/modules/browsingcontext/create/index.md Outdated
Comment thread files/en-us/web/webdriver/reference/bidi/modules/browsingcontext/create/index.md Outdated

@juliandescottes juliandescottes left a comment

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.

Thanks! We should remove references to UUIDs when talking about context or user context ids.

Beyond that there's the open question about the optional userContext property for browsingContext create. The easiest might be to wait until w3c/webdriver-bidi#1071 before documenting this property?

@github-actions github-actions Bot added the merge conflicts 🚧 [PR only] label May 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@dipikabh dipikabh force-pushed the bidi-browsingcontext-1 branch from 656963a to 5e433ef Compare May 20, 2026 21:00
@github-actions github-actions Bot removed the merge conflicts 🚧 [PR only] label May 20, 2026

@juliandescottes juliandescottes left a comment

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.

Thanks for the update @dipikabh ! This looks good to me 👍

@dipikabh

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @juliandescottes!

I'll submit it for an editorial review now

@dipikabh dipikabh changed the title [Technical review] BiDi - Add pages for browsingContext module, part 1: context lifecycle commands [Editorial review] BiDi - Add pages for browsingContext module, part 1: context lifecycle commands May 29, 2026
@dipikabh dipikabh requested a review from pepelsbey May 29, 2026 17:35

@pepelsbey pepelsbey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! Thank you 🙂

A few questions/suggestions below:

Parameters order

I noticed that the parameter order differs between the BiDi reference pages:

  • It’s alphabetical, no matter if required or optional
  • In session.subscribe required go first, optional follow alphabetically

I like the “required first, optional alphabetically” order, actually. It’s user-friendly. I wonder if we should consistently apply it everywhere.

If not, I would at least make session.subscribe’s parameters alphabetical.

UUID

It might be out of the scope of this PR, but there are a few more UUIDs that you’re removing in this PR.

A string that contains the ID ([UUID](/en-US/docs/Glossary/UUID))
  • input/performActions
  • input/releaseActions
  • input/setFiles
  • input/fileDialogOpened

I wonder if they also need to be updated.

Comment thread files/en-us/web/webdriver/reference/bidi/modules/browsingcontext/create/index.md Outdated
Comment thread files/en-us/web/webdriver/reference/bidi/modules/browsingcontext/index.md Outdated
@dipikabh

dipikabh commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @pepelsbey!

I've fixed your comments.

  • UUID removal: I missed the input module files. Adding those as well to this PR.
  • Order of parameters: Good catch. I checked a few API pages and it looks like on MDN we follow alphabetical order, even when there's a mix of required and optional parameters. I prefer alphabetical too because it's more predictable and easier to stick to. I will need to make the fix in both "Parameters" and "Return value" sections and in more pages than just session.subscribe, so I'll take it up in a follow-up PR.

@whimboo whimboo requested review from pepelsbey and removed request for whimboo June 3, 2026 13:09
@dipikabh

dipikabh commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

I'll merge this now and send a follow-up PR

@dipikabh dipikabh merged commit 1db2c61 into mdn:main Jun 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebDriver WebDriver docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants