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

Remove "responsible document" concept #7694

Merged
merged 1 commit into from
Mar 16, 2022
Merged
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
85 changes: 32 additions & 53 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -82723,12 +82723,6 @@ interface <dfn interface>BarProp</dfn> {
<code>Document</code></span>.</p>
</dd>

<dt>The <span>responsible document</span></dt>
<dd>
<p>Return <var>window</var>'s <span data-x="concept-document-window">associated
<code>Document</code></span>.</p>
</dd>

<dt>The <span>API URL character encoding</span></dt>
<dd>
<p>Return the current <span data-x="document's character encoding">character encoding</span>
Expand Down Expand Up @@ -85784,11 +85778,12 @@ interface <dfn interface>BarProp</dfn> {
<var>environment</var> is the result of running these steps:</p>

<ol>
<li><p>Assert: <var>environment</var> has a <span>responsible document</span>.</p></li>
<li><p>Assert: <var>environment</var>'s <span data-x="concept-settings-object-global">global
object</span> is a <code>Window</code>.</p></li>

<li><p>Return <var>environment</var>'s <span>responsible document</span>'s <span
data-x="concept-document-bc">browsing context</span>'s <span>top-level browsing context</span>'s
<span data-x="tlbc browsing session">browsing session</span>.</p></li>
<li><p>Return <var>environment</var>'s <span data-x="concept-settings-object-global">global
object</span>'s <span data-x="window bc">browsing context</span>'s <span>top-level browsing
context</span>'s <span data-x="tlbc browsing session">browsing session</span>.</p></li>
</ol>

</div>
Expand Down Expand Up @@ -91104,10 +91099,12 @@ interface <dfn interface>BeforeUnloadEvent</dfn> : <span>Event</span> {
<p>A <span>URL</span> that represents the location of the resource with which this
<span>environment</span> is associated.</p>

<p class="note">In the case of an <span>environment settings object</span>, this URL might be
distinct from the <span>environment settings object</span>'s <span>responsible
document</span>'s <span data-x="concept-document-url">URL</span>, due to mechanisms such as
<code data-x="dom-history-pushstate">history.pushState()</code>.</p>
<p class="note">In the case of a <code>Window</code> <span>environment settings object</span>,
this URL might be distinct from its <span data-x="concept-settings-object-global">global
object</span>'s <span data-x="concept-document-window">associated
<code>Document</code></span>'s <span data-x="concept-document-url">URL</span>, due to
mechanisms such as <code data-x="dom-history-pushstate">history.pushState()</code> which modify
the latter.</p>
</dd>

<dt>A <dfn id="concept-environment-top-level-creation-url" export
Expand Down Expand Up @@ -91181,21 +91178,6 @@ interface <dfn interface>BeforeUnloadEvent</dfn> : <span>Event</span> {
<p>A <span>module map</span> that is used when importing JavaScript modules.</p>
</dd>

<dt>A <dfn export for="environment settings object">responsible document</dfn></dt>

<dd>
<p>A <code>Document</code> that is assigned responsibility for actions taken by the scripts that
use this <span>environment settings object</span>.</p>

<p class="example">For example, the <span data-x="concept-document-url">URL</span> of the
<span>responsible document</span> is used to set the <span
data-x="concept-document-url">URL</span> of the <code>Document</code> after it has been reset
using <code data-x="dom-document-open">document.open()</code>.</p>

<p>If the <span>responsible event loop</span> is not a <span>window event loop</span>, then the
<span>environment settings object</span> has no <span>responsible document</span>.</p>
</dd>

<dt>An <dfn export for="environment settings object">API URL character encoding</dfn></dt>

<dd>
Expand Down Expand Up @@ -94813,7 +94795,9 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
the browsing context's <span>active document</span>.</p></li>

<li><p>If the task is being queued by or for a <span data-x="concept-script">script</span>, then
return the script's <span>settings object</span>'s <span>responsible document</span>.</p></li>
return the script's <span>settings object</span>'s <span
data-x="concept-settings-object-global">global object</span>'s <span
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>

<li><p>Assert: this step is never reached, because one of the previous conditions must be true.
<span class="&#x0058;&#x0058;&#x0058;">Really?</span></p></li>
Expand Down Expand Up @@ -101460,11 +101444,10 @@ dictionary <dfn dictionary>StructuredSerializeOptions</dfn> {
the port's <span>relevant global object</span>'s <span data-x="concept-document-window">associated
<code>Document</code></span>.</p>

<p class="note">If the document is <span>fully active</span>, but the event listeners all have
scripts whose <span data-x="settings object">settings objects</span> specify <span
data-x="responsible document">responsible documents</span> that are <em>not</em> <span>fully
active</span>, then the messages will not be received unless and until the documents become
<span>fully active</span> again.</p>
<p class="note">If the document is <span>fully active</span>, but the event listeners were all
created in the context of documents that are <em>not</em> <span>fully active</span>, then the
messages will not be received unless and until the documents become <span>fully active</span>
again.</p>

<p>Each <span>event loop</span> has a <span>task source</span> called the <dfn>unshipped port
message queue</dfn>. This is a virtual <span>task source</span>: it must act as if it contained
Expand Down Expand Up @@ -102720,15 +102703,16 @@ interface <dfn interface>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope
global scope</var>. This list includes the implicit <code>MessagePort</code> in the case of <span
data-x="DedicatedWorkerGlobalScope">dedicated workers</span>.</p>

<p id="list-of-relevant-document-objects-to-add">Given an <span>environment settings object</span>
<var>o</var> when creating or obtaining a worker, the <dfn>relevant owner to add</dfn> depends on
the type of <span data-x="concept-settings-object-global">global object</span> specified by
<var>o</var>. If <var>o</var> specifies a <span data-x="concept-settings-object-global">global
object</span> that is a <code>WorkerGlobalScope</code> object (i.e., if we are creating a nested
dedicated worker), then the relevant owner is that global object. Otherwise, <var>o</var>
specifies a <span data-x="concept-settings-object-global">global object</span> that is a
<code>Window</code> object, and the relevant owner is the <span>responsible document</span>
specified by <var>o</var>.</p>
<p id="list-of-relevant-document-objects-to-add">Given an <span>environment settings
object</span> <var>o</var> when creating or obtaining a worker, the <dfn>relevant owner to
add</dfn> depends on the type of <span data-x="concept-settings-object-global">global
object</span> specified by <var>o</var>. If <var>o</var>'s <span
data-x="concept-settings-object-global">global object</span> is a <code>WorkerGlobalScope</code>
object (i.e., if we are creating a nested dedicated worker), then the relevant owner is that
global object. Otherwise, <var>o</var>'s <span data-x="concept-settings-object-global">global
object</span> is a <code>Window</code> object, and the relevant owner is that
<code>Window</code>'s <span data-x="concept-document-window">associated
<code>Document</code></span>.</p>

<hr>

Expand Down Expand Up @@ -103189,10 +103173,6 @@ interface <dfn interface>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope
data-x="concept-WorkerGlobalScope-module-map">module map</span>.</p>
</dd>

<dt>The <span>responsible document</span></dt>
<dd><p>Not applicable (the <span>responsible event loop</span> is not a <span>window event
loop</span>).</p></dd>

<dt>The <span>API URL character encoding</span></dt>
<dd>
<p>Return <span>UTF-8</span>.</p>
Expand Down Expand Up @@ -104351,10 +104331,6 @@ interface <dfn interface>WorkletGlobalScope</dfn> {};</code></pre>
data-x="concept-WorkletGlobalScope-module-map">module map</span>.</p>
</dd>

<dt>The <span>responsible document</span></dt>
<dd><p>Not applicable (the <span>responsible event loop</span> is not a <span>window event
loop</span>).</p></dd>

<dt>The <span>API URL character encoding</span></dt>
<dd>
<p>Return <span>UTF-8</span>.</p>
Expand Down Expand Up @@ -119583,7 +119559,10 @@ if (s = prompt('What is your name?')) {
<li>None of the elements in the <code>Document</code> are in any of the following namespaces: <span>HTML namespace</span>, <span>SVG namespace</span>, <span>MathML namespace</span>
<li>The <code>Document</code> has no <span>focusable area</span> (e.g. from XLink) other than the <span>viewport</span>.
<li>The <code>Document</code> has no <span data-x="hyperlink">hyperlinks</span> (e.g. from XLink).
<li>There exists no <span data-x="concept-script">script</span> whose <span>settings object</span> specifies this <code>Document</code> as the <span>responsible document</span>.
<li>There exists no <span data-x="concept-script">script</span> whose <span>settings
object</span>'s <span data-x="concept-settings-object-global">global object</span> is a
<code>Window</code> object with this <code>Document</code> as its <span
data-x="concept-document-window">associated <code>Document</code></span>.
<li>None of the elements in the <code>Document</code> have any registered event listeners.
</ul>

Expand Down