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

When does the first browsing context create ? #6814

Closed
scw00 opened this issue Jun 30, 2021 · 4 comments
Closed

When does the first browsing context create ? #6814

scw00 opened this issue Jun 30, 2021 · 4 comments

Comments

@scw00
Copy link

scw00 commented Jun 30, 2021

https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigating-across-documents

To navigate a browsing context browsingContext to a resource resource, with an optional boolean exceptionsEnabled (default false), an optional history handling behavior historyHandling (default "default"), an optional policy container-or-null historyPolicyContainer (default null) and an optional string navigationType (default "other"):​

Hi, It seems like the navigated algorithm started when I enter a url. The browsing context was passed as parameter to this algorithm.

It make me confused when browsing context creates ?

@scw00 scw00 changed the title "To navigate a browsing context browsingContext ..." When does the first browsing context created ? Jun 30, 2021
@scw00 scw00 changed the title When does the first browsing context created ? When does the first browsing context create ? Jun 30, 2021
@domenic
Copy link
Member

domenic commented Jun 30, 2021

This is done by the "create a new browsing context" algorithm: https://html.spec.whatwg.org/#creating-a-new-browsing-context

Hope this helps!

@domenic domenic closed this as completed Jun 30, 2021
@scw00
Copy link
Author

scw00 commented Jul 1, 2021

thanks

@scw00
Copy link
Author

scw00 commented Jul 1, 2021

Hi @domenic , "create a new browsing context" must given a browsing context group as parameter. And the bc group creation is relate to top level browsing context creation. Finally top level bc creation is depend on the navigate algorithm ("obtain a browsing context to use for a navigation response" actually, indirectly called from "navigate"). In these call stack, the initialize bc was embedded into "navigation params " and passed to "create top level browsing context" (see https://html.spec.whatwg.org/multipage/browsing-the-web.html#initialise-the-document-object)

So it make me confusing again, when does the initialize bc create ?

@domenic
Copy link
Member

domenic commented Jul 1, 2021

If you click on a term, you can find all its usage sites. So e.g. if you click on "create a browsing context" you can see all its callers and how they set things up.

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

No branches or pull requests

2 participants