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

Stop using "browsing context" in the spec #362

Closed
rakuco opened this issue Jul 5, 2023 · 3 comments · Fixed by #363
Closed

Stop using "browsing context" in the spec #362

rakuco opened this issue Jul 5, 2023 · 3 comments · Fixed by #363
Assignees

Comments

@rakuco
Copy link
Member

rakuco commented Jul 5, 2023

Since whatwg/html#6315, the HTML spec suggests other specifications use "navigable" and associated concepts (along with Document) rather than "browsing context" in most cases. See also the notice in https://html.spec.whatwg.org/multipage/document-sequences.html#windows:

Modern specifications should avoid using the browsing context concept in most cases, unless they are dealing with the subtleties of browsing context group switches and agent cluster allocation. Instead, the Document and navigable concepts are usually more appropriate.

This specification references "browsing context" in https://w3c.github.io/screen-wake-lock/#the-request-method

@rakuco rakuco self-assigned this Jul 5, 2023
@reillyeon
Copy link
Member

I think in that request() algorithm we can simply remove the reference to "browsing context" since I believe that check is essentially a duplicate of the "is fully active" check in the next step. I don't think the browsing context being null is a specification concept and I assume the language was added to mirror checks in Blink for a null execution context..

@rakuco
Copy link
Member Author

rakuco commented Jul 5, 2023

I don't think the browsing context being null is a specification concept

Per https://html.spec.whatwg.org/multipage/document-sequences.html#concept-document-bc it's at least possible, but I can't think of a case where a document is fully active and has a null browsing context. I think just removing that step from the algorithm like you said makes sense.

@rakuco
Copy link
Member Author

rakuco commented Jul 12, 2023

For the record, I've filed whatwg/html#9509 to confirm that this step can be safely removed.

rakuco added a commit that referenced this issue Jul 14, 2023
Since whatwg/html#6315, the HTML spec suggests other specifications use
"navigable" and associated concepts (along with Document) rather than
"browsing context" in most cases.

In this specific case, however, we can simply remove the step that checks if
`document`'s browsing context is null -- there is no case in which a
document is fully active _and_ has a null browsing context, as confirmed by
whatwg/html#9509.

Fixes #362.
rakuco added a commit that referenced this issue Jul 14, 2023
Since whatwg/html#6315, the HTML spec suggests other specifications use
"navigable" and associated concepts (along with Document) rather than
"browsing context" in most cases.

In this specific case, however, we can simply remove the step that checks if
`document`'s browsing context is null -- there is no case in which a
document is fully active _and_ has a null browsing context, as confirmed by
whatwg/html#9509.

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

Successfully merging a pull request may close this issue.

2 participants