-
Notifications
You must be signed in to change notification settings - Fork 2.9k
For #script-closable, clarify when a browsing context is created by script #11208
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
Conversation
source
Outdated
@@ -99528,6 +99536,8 @@ interface <dfn interface>NotRestoredReasons</dfn> { | |||
|
|||
<li><p>An <dfn>is auxiliary</dfn> boolean, initially false.</p></li> | |||
|
|||
<li><p>An <dfn>is created by web content</dfn> boolean, initially false.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense for this to live on the browsing context? Once there's a COOP-style navigation the tab can no longer be closed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think browsers behave in such a way that windows are still script-closable after COOP-style navigations.
Would it be better for the flag to be on Navigable
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think in that case it would be.
@domenic or @jakearchibald should probably review as well given that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the change and will look into writing a test for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me modulo some editorial concerns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, modulo the editorial concerns. If you could fix those up I can merge this soon, or I can work on fixing them myself when I have just a bit more extra time.
Introduce an "is created by web content" flag on browsing contexts to determine script-closability. This flag is set when a new top-level traversable is created as a result of window.open(), link navigation, or form submission.
In reference to #1866.
(See WHATWG Working Mode: Changes for more details.)
cc @zcorpan
/document-sequences.html ( diff )
/nav-history-apis.html ( diff )