@@ -93636,7 +93636,7 @@ document.querySelector("button").addEventListener("click", bound);
93636
93636
</ol>
93637
93637
93638
93638
<p>To <dfn>fetch a single imported module script</dfn>, given a <var>settings object</var>, a
93639
- <var>base URL</var>, a <var>destination</var>, some <var>options</var>, a
93639
+ <var>base URL</var>, a <var>destination</var>, some <var>options</var>, a <var>referrer</var>, a
93640
93640
<var>moduleRequest</var>, and an <var>onComplete</var> algorithm, run these steps.
93641
93641
<var>onComplete</var> must be an algorithm accepting null (on failure) or a <span>module
93642
93642
script</span> (on success).</p>
@@ -93662,8 +93662,8 @@ document.querySelector("button").addEventListener("click", bound);
93662
93662
93663
93663
<li><p><span>Fetch a single module script</span> given <var>url</var>, <var>settings
93664
93664
object</var>, <var>destination</var>, <var>options</var>, <var>settings object</var>,
93665
- "<code data-x="">client</code>" , <var>moduleRequest</var>, with the <var>top-level module
93666
- fetch flag</var> unset, and with <var>onComplete</var>.</p></li>
93665
+ <var>referrer</var> , <var>moduleRequest</var>, with the <var>top-level module fetch flag</var>
93666
+ unset, and with <var>onComplete</var>.</p></li>
93667
93667
</ol>
93668
93668
93669
93669
<h5 id="creating-scripts">Creating scripts</h5>
@@ -95046,6 +95046,8 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
95046
95046
<li><p>Let <var>fetch options</var> be the <span>default classic script fetch
95047
95047
options</span>.</p></li>
95048
95048
95049
+ <li><p>Let <var>fetch referrer</var> be "<code data-x="">client</code>".</p></li>
95050
+
95049
95051
<li>
95050
95052
<p>If <var>referrer</var> is a <span>Script Record</span> or a <span data-x="Cyclic Module
95051
95053
Record">Module Record</span>, then:</p>
@@ -95067,6 +95069,15 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
95067
95069
<li><p>Assert: Neither <var>base URL</var> nor <var>fetch options</var> is null, as
95068
95070
<var>referencing script</var> is a <span>classic script</span> or a <span>JavaScript module
95069
95071
script</span>.</p></li>
95072
+
95073
+ <li>
95074
+ <p>If <var>loadState</var> is not undefined, set <var>fetch referrer</var> to <var>base
95075
+ URL</var>.</p>
95076
+
95077
+ <p class="XXX">We check <var>loadState</var> to not propagate the referrer when using dynamic
95078
+ imports. <a href="https://github.com/whatwg/html/issues/3744">Issue #3744</a> looks into
95079
+ aligning dynamic imports with static imports.</p>
95080
+ </li>
95070
95081
</ol>
95071
95082
95072
95083
<div class="example">
@@ -95091,8 +95102,9 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
95091
95102
95092
95103
<li>
95093
95104
<p><span>Fetch a single imported module script</span> given <var>settings object</var>,
95094
- <var>base URL</var>, <var>destination</var>, <var>fetch options</var>, <var>moduleRequest</var>,
95095
- and with the following steps given <var>module script</var>:</p>
95105
+ <var>base URL</var>, <var>destination</var>, <var>fetch options</var>, <var>fetch
95106
+ referrer</var>, <var>moduleRequest</var>, and with the following steps given <var>module
95107
+ script</var>:</p>
95096
95108
95097
95109
<ol>
95098
95110
<li><p>If <var>module script</var> is null, then let <var>completion</var> be Completion {
0 commit comments