Skip to content

[Editorial review] BiDi - Add pages for browsingContext module, part 2: context lifecycle command and events#44279

Merged
dipikabh merged 6 commits into
mdn:mainfrom
dipikabh:bidi-browsingcontext-2
Jun 9, 2026
Merged

[Editorial review] BiDi - Add pages for browsingContext module, part 2: context lifecycle command and events#44279
dipikabh merged 6 commits into
mdn:mainfrom
dipikabh:bidi-browsingcontext-2

Conversation

@dipikabh

Copy link
Copy Markdown
Contributor

Description

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

  • browsingContext.getTree
  • browsingContext.contextCreated
  • browsingContext.contextDestroyed

Other pages updated include:

  • browsingContext module landing page: Added list items for the three new pages
    (the base content updates to this file are in the part 1 set)
  • input.fileDialogOpened: Added "active session" to the example intro for consistency

Spec links

Related issue

Doc issue: mdn/mdn#339

@dipikabh dipikabh requested a review from a team May 27, 2026 17:37
@dipikabh dipikabh requested review from a team as code owners May 27, 2026 17:37
@dipikabh dipikabh requested review from chrisdavidmills and removed request for a team and chrisdavidmills May 27, 2026 17:37
@github-actions github-actions Bot added Content:WebDriver WebDriver docs size/l [PR only] 501-1000 LoC changed labels May 27, 2026
@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (5 pages)

Flaws (1)

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/browsingContext/getTree
Title: browsingContext.getTree command
Flaw count: 1

  • broken_links:
    • Link /en-US/docs/Web/HTML/Attributes/rel/noopener is a redirect

(comment last updated: 2026-06-03 20:40:21)

@chrisdavidmills chrisdavidmills 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.

Hi @dipikabh! I have a few comments for you to consider, but overall, this is looking pretty decent. Nice work.

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

## Commands

- [`browsingContext.getTree`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browsingContext/getTree)

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.

Shouldn't these list items be DLs, with descriptions of each item?

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.

So, because I want to list commands and events in their respective sections on the landing page, I can't use
the SubPagesWithSummaries macro - as far as I know, it generates one flat list of all the child pages in the parent directory. And so the links here are not auto-generated, I'm adding them to the list as I author the pages.

I'm less inclined to add descriptions manually since they'd risk getting out of sync with the descriptions on the actual pages. But I'm happy to reconsider if you feel strongly that this would be significantly useful to readers - what do you think?

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.

It would be useful, and also more consistent with how we do things normally on MDN landing pages.

But if you are hitting some kind of technical limitation (I didn't exactly understand the bit about the macro), then I think we can live with it.

@dipikabh dipikabh Jun 9, 2026

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.

Got it, let me consider the options and address in a follow-up.

About the macro, I meant when i use SubPagesWithSummaries, it generates something like this:

list of commands and events in browsingcontext module

that is, a flat list of all child pages with no provision to separate them into Commands and Events sections. The macro cannot target the pages by page-type for me to split them into sections.

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

@lutien lutien 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! That looks good to me!

The `params` field in the event notification is a context object with the following properties, describing the discarded context and its subtree:

- `children`
- : An array of context objects that represents child contexts.

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.

Do we have a definition of the context info type that we could link here? Maybe we could use the one from browsingContext.getTree?

@dipikabh dipikabh Jun 3, 2026

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.

We're not covering types separately.
But that's a nice hint - I've linked "context object" to the return value in browsingContext.getTree. Also added the link in browsingContext.contextCreated.

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

github-actions Bot commented Jun 3, 2026

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-2 branch from e213ec1 to b792d57 Compare June 3, 2026 20:34
@github-actions github-actions Bot removed the merge conflicts 🚧 [PR only] label Jun 3, 2026
Comment thread files/en-us/web/webdriver/reference/bidi/modules/browsingcontext/index.md Outdated
@dipikabh

dipikabh commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, Chris for the thorough review - please take a look at my fixes and responses when you have a moment.

Thank you @lutien and @whimboo for the quick review!

@dipikabh dipikabh requested a review from chrisdavidmills June 3, 2026 20:47
@dipikabh dipikabh changed the title [Technical review] BiDi - Add pages for browsingContext module, part 2: context lifecycle command and events [Editorial review] BiDi - Add pages for browsingContext module, part 2: context lifecycle command and events Jun 4, 2026

@chrisdavidmills chrisdavidmills 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.

@dipikabh, lovely work: I'm pretty happy with this now. I've added a few follow-up comments; I think only one of them requires some thought. I'll approve it anyway, so you can merge when done.

@dipikabh dipikabh merged commit a3d6e24 into mdn:main Jun 9, 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/l [PR only] 501-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants