Skip to content

Commit e7e6ae5

Browse files
Fix fetch referrer of static imports triggered by dynamic imports
1 parent 6d17b81 commit e7e6ae5

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

source

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98643,7 +98643,8 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
9864398643
and <var>loadState</var> is undefined, then:</p>
9864498644

9864598645
<p class="note"><var>loadState</var> is undefined when the current fetching process has been
98646-
initiated by a dynamic <code>import()</code> call.</p>
98646+
initiated by a dynamic <code>import()</code> call, either directly or when loading the
98647+
transitive dependencies of the dynamically imported module.</p>
9864798648

9864898649
<ol>
9864998650
<li><p>Let <var>completion</var> be the <span>Completion Record</span> { [[Type]]: throw, [[Value]]: a new
@@ -98682,12 +98683,21 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
9868298683
script</span>.</p></li>
9868398684

9868498685
<li>
98685-
<p>If <var>loadState</var> is not undefined, set <var>fetch referrer</var> to
98686-
<var>referrer</var>'s <span data-x="concept-script-base-url">base URL</span>.</p>
98686+
<p>If none of the following conditions is true</p>
9868798687

98688-
<p class="XXX">We check <var>loadState</var> to not propagate the referrer when using dynamic
98689-
imports. <a href="https://github.com/whatwg/html/issues/3744">Issue #3744</a> looks into
98690-
aligning dynamic imports with static imports.</p>
98688+
<ul class="brief">
98689+
<li><var>referrer</var> is a <span>Script Record</span></li>
98690+
98691+
<li><var>referrer</var> is a <span data-x="Cyclic Module Record">Module Record</span> and
98692+
<var>referrer</var>.[[Status]] is one of evaluating, evaluating-async or evaluated</li>
98693+
</ul>
98694+
98695+
<p>then set <var>fetch referrer</var> to <var>referrer</var>'s <span
98696+
data-x="concept-script-base-url">base URL</span>.</p>
98697+
98698+
<p class="XXX">We set <var>fetch referrer</var> conditionally to not propagate the referrer
98699+
when using <code>import()</code>. <a href="https://github.com/whatwg/html/issues/3744">Issue
98700+
#3744</a> looks into aligning dynamic imports with static imports.</p>
9869198701
</li>
9869298702
</ol>
9869398703

0 commit comments

Comments
 (0)