Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions source
Original file line number Diff line number Diff line change
@@ -91772,11 +91772,19 @@ dictionary <dfn dictionary>WindowPostMessageOptions</dfn> : <span>StructuredSeri
</li>
</ol>

<p>A <span>navigable</span> is <dfn>script-closable</dfn> if its <span data-x="nav-bc">active
browsing context</span> is an <span>auxiliary browsing context</span> that was created by a
script (as opposed to by an action of the user), or if it is a <span>top-level traversable</span>
whose <span data-x="tn-session-history-entries">session history entries</span>'s <span
data-x="list size">size</span> is 1.</p>
<p>A <span>navigable</span> is <dfn>script-closable</dfn> if it is a
<span>top-level traversable</span>, and any of the following is true:</p>
<ul>
Copy link
Member

Choose a reason for hiding this comment

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

Newline before the <ul>.

<li>it <span>is created by web content</span>; or</li>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<li>it <span>is created by web content</span>; or</li>
<li>its <span>is created by web content</span> is true; or</li>

You also need to fix the indentation below.

<li>its <span data-x="tn-session-history-entries">session history entries</span>'s
<span data-x="list size">size</span> is 1.</li>
</ul>

<!--
https://source.chromium.org/chromium/chromium/src/+/b20d6a654f6891ed49373d9f535d8618ded1e2e2
The session history check is a special case for one-off windows that need to open other windows
and then dispose of themselves. This use case might not be necessary anymore.
-->

<p>The <dfn attribute for="Window"><code data-x="dom-window-closed">closed</code></dfn> getter
steps are to return true if <span>this</span>'s <span data-x="window bc">browsing context</span>
@@ -98494,6 +98502,8 @@ interface <dfn interface>NotRestoredReasons</dfn> {
<p>See the <a href="#page-visibility">page visibility</a> section for the requirements on this
item.</p>
</li>

<li><p>An <dfn>is created by web content</dfn> boolean, initially false.</p></li>
</ul>

<p>To get the <dfn data-x="nav-traversable" export for="navigable">traversable navigable</dfn> of
@@ -99480,6 +99490,9 @@ interface <dfn interface>NotRestoredReasons</dfn> {
contexts flag</span> is set, then all the flags that are set in <var>sandboxingFlagSet</var>
must be set in <var>chosen</var>'s <span data-x="nav-bc">active browsing context</span>'s
<span>popup sandboxing flag set</span>.</p></li>

<li><p>Set <var>targetNavigable</var>'s <span>is created by web content</span> to true.</p>
</li>
Copy link
Member

Choose a reason for hiding this comment

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

This needs to stick to the </p> so the newline needs to be before "true" I suspect.

</ol>

<p class="note">If the newly created <span>navigable</span> <var>chosen</var> is immediately