Skip to content

Commit 80cf9f0

Browse files
committed
Editorial: Give script's settings object an unambiguous ID.
1 parent 53346e4 commit 80cf9f0

File tree

1 file changed

+43
-34
lines changed

1 file changed

+43
-34
lines changed

source

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -95517,7 +95517,7 @@ document.querySelector("button").addEventListener("click", bound);
9551795517
data-x="struct">structs</span>. All scripts have:</p>
9551895518

9551995519
<dl>
95520-
<dt>A <dfn for="script" export>settings object</dfn></dt>
95520+
<dt>A <dfn for="script" export data-x="concept-script-settings-object">settings object</dfn></dt>
9552195521

9552295522
<dd><p>An <span>environment settings object</span>, containing various settings that are shared
9552395523
with other <span data-x="concept-script">scripts</span> in the same context.</p></dd>
@@ -95585,7 +95585,6 @@ document.querySelector("button").addEventListener("click", bound);
9558595585
scripts.</p></dd>
9558695586
</dl>
9558795587

95588-
9558995588
<p>A <dfn export>classic script</dfn> is a type of <span data-x="concept-script">script</span>
9559095589
that has the following additional <span data-x="struct item">item</span>:</p>
9559195590

@@ -96562,10 +96561,10 @@ document.querySelector("button").addEventListener("click", bound);
9656296561
<li>
9656396562
<p><span>Fetch a single module script</span> given <var>url</var>, <var>fetch client settings
9656496563
object</var>, <var>destination</var>, <var>options</var>, <var>referringScript</var>'s
96565-
<span>settings object</span>, <var>referringScript</var>'s <span
96566-
data-x="concept-script-base-url">base URL</span>, <var>moduleRequest</var>, false, and
96567-
<var>onSingleFetchComplete</var> as defined below. If <var>performFetch</var> was given, pass
96568-
it along as well.</p>
96564+
<span data-x="concept-script-settings-object">settings object</span>,
96565+
<var>referringScript</var>'s <span data-x="concept-script-base-url">base URL</span>,
96566+
<var>moduleRequest</var>, false, and <var>onSingleFetchComplete</var> as defined below.
96567+
If <var>performFetch</var> was given, pass it along as well.</p>
9656996568

9657096569
<p><var>onSingleFetchComplete</var> given <var>result</var> is the following algorithm:</p>
9657196570

@@ -96719,7 +96718,8 @@ document.querySelector("button").addEventListener("click", bound);
9671996718
<var>moduleScript</var> and an optional <var>discoveredSet</var>:</p>
9672096719

9672196720
<ol>
96722-
<li><p>Let <var>moduleMap</var> be <var>moduleScript</var>'s <span>settings object</span>'s
96721+
<li><p>Let <var>moduleMap</var> be <var>moduleScript</var>'s
96722+
<span data-x="concept-script-settings-object">settings object</span>'s
9672396723
<span data-x="concept-settings-object-module-map">module map</span>.</p></li>
9672496724

9672596725
<li><p>If <var>discoveredSet</var> was not given, let it be an empty <span>set</span>.</p></li>
@@ -96796,7 +96796,8 @@ document.querySelector("button").addEventListener("click", bound);
9679696796
<li><p>Let <var>script</var> be a new <span>classic script</span> that this algorithm will
9679796797
subsequently initialize.</p></li>
9679896798

96799-
<li><p>Set <var>script</var>'s <span>settings object</span> to <var>settings</var>.</p></li>
96799+
<li><p>Set <var>script</var>'s <span data-x="concept-script-settings-object">settings
96800+
object</span> to <var>settings</var>.</p></li>
9680096801

9680196802
<li><p>Set <var>script</var>'s <span data-x="concept-script-base-url">base URL</span> to
9680296803
<var>baseURL</var>.</p></li>
@@ -96848,7 +96849,8 @@ document.querySelector("button").addEventListener("click", bound);
9684896849
<li><p>Let <var>script</var> be a new <span>module script</span> that this algorithm will
9684996850
subsequently initialize.</p></li>
9685096851

96851-
<li><p>Set <var>script</var>'s <span>settings object</span> to <var>settings</var>.</p></li>
96852+
<li><p>Set <var>script</var>'s <span data-x="concept-script-settings-object">settings
96853+
object</span> to <var>settings</var>.</p></li>
9685296854

9685396855
<li><p>Set <var>script</var>'s <span data-x="concept-script-base-url">base URL</span> to
9685496856
<var>baseURL</var>.</p></li>
@@ -96941,7 +96943,8 @@ document.querySelector("button").addEventListener("click", bound);
9694196943
<li><p>Let <var>script</var> be a new <span>module script</span> that this algorithm will
9694296944
subsequently initialize.</p></li>
9694396945

96944-
<li><p>Set <var>script</var>'s <span>settings object</span> to <var>settings</var>.</p></li>
96946+
<li><p>Set <var>script</var>'s <span data-x="concept-script-settings-object">settings
96947+
object</span> to <var>settings</var>.</p></li>
9694596948

9694696949
<li><p>Set <var>script</var>'s <span data-x="concept-script-base-url">base URL</span> and
9694796950
<span data-x="concept-script-script-fetch-options">fetch options</span> to null.</p></li>
@@ -96980,7 +96983,8 @@ document.querySelector("button").addEventListener("click", bound);
9698096983
<li><p>Let <var>script</var> be a new <span>module script</span> that this algorithm will
9698196984
subsequently initialize.</p></li>
9698296985

96983-
<li><p>Set <var>script</var>'s <span>settings object</span> to <var>settings</var>.</p></li>
96986+
<li><p>Set <var>script</var>'s <span data-x="concept-script-settings-object">settings
96987+
object</span> to <var>settings</var>.</p></li>
9698496988

9698596989
<li><p>Set <var>script</var>'s <span data-x="concept-script-base-url">base URL</span> and
9698696990
<span data-x="concept-script-script-fetch-options">fetch options</span> to null.</p></li>
@@ -97052,7 +97056,8 @@ document.querySelector("button").addEventListener("click", bound);
9705297056
and an optional boolean <var>rethrow errors</var> (default false):</p>
9705397057

9705497058
<ol>
97055-
<li><p>Let <var>settings</var> be the <span>settings object</span> of <var>script</var>.</p></li>
97059+
<li><p>Let <var>settings</var> be the <span data-x="concept-script-settings-object">settings
97060+
object</span> of <var>script</var>.</p></li>
9705697061

9705797062
<li><p><span>Check if we can run script</span> with <var>settings</var>. If this returns "do
9705897063
not run" then return <span>NormalCompletion</span>(empty).</p></li>
@@ -97133,7 +97138,8 @@ document.querySelector("button").addEventListener("click", bound);
9713397138
and an optional boolean <var>preventErrorReporting</var> (default false):</p>
9713497139

9713597140
<ol>
97136-
<li><p>Let <var>settings</var> be the <span>settings object</span> of <var>script</var>.</p></li>
97141+
<li><p>Let <var>settings</var> be the <span data-x="concept-script-settings-object">settings
97142+
object</span> of <var>script</var>.</p></li>
9713797143

9713897144
<li><p><span>Check if we can run script</span> with <var>settings</var>. If this returns "do
9713997145
not run", then return a promise resolved with undefined.</p></li>
@@ -97364,9 +97370,9 @@ document.querySelector("button").addEventListener("click", bound);
9736497370
data-x="concept-script">script</span>, with the problematic position (line number and column
9736597371
number) in the resource containing the script, using the <span
9736697372
data-x="concept-settings-object-global">global object</span> specified by the script's
97367-
<span>settings object</span> as the target. If the error is still <i
97368-
data-x="concept-error-nothandled">not handled</i> after this, then the error may be reported to a
97369-
developer console.</p>
97373+
<span data-x="concept-script-settings-object">settings object</span> as the target. If the error
97374+
is still <i data-x="concept-error-nothandled">not handled</i> after this, then the error may be
97375+
reported to a developer console.</p>
9737097376

9737197377
<p class="XXX">The existence of both <span data-x="report the error">report an error</span> and
9737297378
<span data-x="report the exception">report an exception</span> is confusing, and both algorithms
@@ -97611,8 +97617,8 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
9761197617
<p>If <var>referringScript</var> is not null, then:</p>
9761297618

9761397619
<ol>
97614-
<li><p>Set <var>settingsObject</var> to <var>referringScript</var>'s <span>settings
97615-
object</span>.</p></li>
97620+
<li><p>Set <var>settingsObject</var> to <var>referringScript</var>'s
97621+
<span data-x="concept-script-settings-object">settings object</span>.</p></li>
9761697622

9761797623
<li><p>Set <var>baseURL</var> to <var>referringScript</var>'s <span
9761897624
data-x="concept-script-base-url">base URL</span>.</p></li>
@@ -98382,8 +98388,8 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
9838298388
<li><p>If <var>script</var> is a <span>classic script</span> and <var>script</var>'s <span>muted
9838398389
errors</span> is true, terminate these steps.</p></li>
9838498390

98385-
<li><p>Let <var>settings object</var> be <var>script</var>'s <span>settings object</span>.</p>
98386-
</li>
98391+
<li><p>Let <var>settings object</var> be <var>script</var>'s
98392+
<span data-x="concept-script-settings-object">settings object</span>.</p></li>
9838798393

9838898394
<li>
9838998395
<p>If <var>operation</var> is <code data-x="">"reject"</code>,
@@ -98622,8 +98628,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
9862298628
<li>
9862398629
<p>If <var>active script</var> is not null, set <var>script execution context</var> to a new
9862498630
<span>JavaScript execution context</span>, with its Function field set to null, its Realm field
98625-
set to <var>active script</var>'s <span>settings object</span>'s <span data-x="environment
98626-
settings object's realm">realm</span>, and its ScriptOrModule set to <var>active script</var>'s
98631+
set to <var>active script</var>'s <span data-x="concept-script-settings-object">settings
98632+
object</span>'s <span data-x="environment settings object's realm">realm</span>, and its
98633+
ScriptOrModule set to <var>active script</var>'s
9862798634
<span data-x="concept-script-record">record</span>.</p>
9862898635

9862998636
<p class="note">As seen below, this is used in order to propagate the current <span>active
@@ -98899,8 +98906,8 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
9889998906
<li><p>Set <var>referencing script</var> to
9890098907
<var>referencingScriptOrModule</var>.[[HostDefined]].</p>
9890198908

98902-
<li><p>Set <var>settings object</var> to <var>referencing script</var>'s <span>settings
98903-
object</span>.</p></li>
98909+
<li><p>Set <var>settings object</var> to <var>referencing script</var>'s
98910+
<span data-x="concept-script-settings-object">settings object</span>.</p></li>
9890498911

9890598912
<li><p>Set <var>fetch options</var> to the <span>descendant script fetch options</span> for
9890698913
<var>referencing script</var>'s <span data-x="concept-script-script-fetch-options">fetch
@@ -98952,8 +98959,9 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
9895298959
<li><p>Set <var>referencingScript</var> to
9895398960
<var>referencingScriptOrModule</var>.[[HostDefined]].</p></li>
9895498961

98955-
<li><p>Set <var>moduleMap</var> to <var>referencingScript</var>'s <span>settings
98956-
object</span>'s <span data-x="concept-settings-object-module-map">module map</span>.</p></li>
98962+
<li><p>Set <var>moduleMap</var> to <var>referencingScript</var>'s
98963+
<span data-x="concept-script-settings-object">settings object</span>'s
98964+
<span data-x="concept-settings-object-module-map">module map</span>.</p></li>
9895798965
</ol>
9895898966
</li>
9895998967

@@ -99286,7 +99294,7 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
9928699294
the browsing context's <span>active document</span>.</p></li>
9928799295

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

@@ -108138,9 +108146,9 @@ interface <dfn interface>SharedWorker</dfn> : <span>EventTarget</span> {
108138108146
<li>
108139108147
<p>If <var>worker global scope</var> is not null, but the user agent has been
108140108148
configured to disallow communication between the worker represented by the <var>worker global
108141-
scope</var> and the <span data-x="concept-script">scripts</span> whose <span data-x="settings
108142-
object">settings object</span> is <var>outside settings</var>, then set <var>worker global
108143-
scope</var> to null.</p>
108149+
scope</var> and the <span data-x="concept-script">scripts</span> whose <span
108150+
data-x="concept-script-settings-object">settings object</span> is <var>outside settings</var>,
108151+
then set <var>worker global scope</var> to null.</p>
108144108152

108145108153
<p class="note">For example, a user agent could have a development mode that isolates a
108146108154
particular <span>top-level traversable</span> from all other pages, and scripts in that
@@ -124292,10 +124300,11 @@ if (s = prompt('What is your name?')) {
124292124300
<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>
124293124301
<li>The <code>Document</code> has no <span>focusable area</span> (e.g. from XLink) other than the <span>viewport</span>.
124294124302
<li>The <code>Document</code> has no <span data-x="hyperlink">hyperlinks</span> (e.g. from XLink).
124295-
<li>There exists no <span data-x="concept-script">script</span> whose <span>settings
124296-
object</span>'s <span data-x="concept-settings-object-global">global object</span> is a
124297-
<code>Window</code> object with this <code>Document</code> as its <span
124298-
data-x="concept-document-window">associated <code>Document</code></span>.
124303+
<li>There exists no <span data-x="concept-script">script</span> whose <span
124304+
data-x="concept-script-settings-object">settings object</span>'s <span
124305+
data-x="concept-settings-object-global">global object</span> is a <code>Window</code> object with
124306+
this <code>Document</code> as its <span data-x="concept-document-window">associated
124307+
<code>Document</code></span>.
124299124308
<li>None of the elements in the <code>Document</code> have any registered event listeners.
124300124309
</ul>
124301124310

0 commit comments

Comments
 (0)