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

Explain more of "create and initialize a Document object" #6494

Merged
merged 1 commit into from
Mar 16, 2021

Conversation

domenic
Copy link
Member

@domenic domenic commented Mar 15, 2021

This should help address some of the questions that came up in #6491. No normative changes.


/browsing-the-web.html ( diff )

This should help address some of the questions that came up in #6491.
Copy link
Member

@rakina rakina left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good to me! This does not cover initial about:blank => about:blank#foo => same-origin document - it probably makes sense to keep the same Window too in this case, but that's a behavior change so we should discuss it in #6491.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

This seems fine, but Window's associated Document not being a Document is a bug of sorts and this further highlights that. (I haven't looked at all the algorithms that get invoked between these two points, but it does not seem robust.)

@domenic
Copy link
Member Author

domenic commented Mar 16, 2021

Yeah, I had a similar discussion with @domfarolino. I argue that it's fine for things to be in a not-fully-initialized/invariants-broken state for a bit as we go through the algorithms. In between those two steps it's just a bunch of syncing up of Document/Window/browsing context/session history, culminating in everything being ready for "set the active document" to finalize the relationship.

@domenic domenic merged commit 921df8e into main Mar 16, 2021
@domenic domenic deleted the note-about-active-document-setting branch March 16, 2021 16:27
@annevk
Copy link
Member

annevk commented Mar 16, 2021

I'm just worried that one of those algorithms we invoke inbetween ends up poking at it directly.

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

Successfully merging this pull request may close these issues.

4 participants