Skip to content

Commit

Permalink
Propagate fetch referrer in dynamic imports
Browse files Browse the repository at this point in the history
Remove the explicit non-propagation of the referrer for dynamic import() calls, and fix whatwg#3744. By doing so, we align fetching static and dynamic imports.
  • Loading branch information
nicolo-ribaudo authored and rubberyuzu committed Jul 20, 2023
1 parent 251bdf6 commit 0cca49d
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -105922,23 +105922,8 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
<var>referencingScript</var> is a <span>classic script</span> or a <span>JavaScript module
script</span>.</p></li>

<li>
<p>If neither of the following conditions are true:</p>

<ul class="brief">
<li><var>referrer</var> is a <span>Script Record</span>; or</li>

<li><var>referrer</var> is a <span data-x="Cyclic Module Record">Module Record</span> and
<var>referrer</var>.[[Status]] is one of evaluating, evaluating-async or evaluated,</li>
</ul>

<p>then set <var>fetchReferrer</var> to <var>referrer</var>'s <span
data-x="concept-script-base-url">base URL</span>.</p>

<p class="XXX">We set <var>fetchReferrer</var> conditionally to not propagate the referrer
when using <code>import()</code>. <a href="https://github.com/whatwg/html/issues/3744">Issue
#3744</a> looks into aligning dynamic imports with static imports.</p>
</li>
<li><p>Set <var>fetchReferrer</var> to <var>referrer</var>'s <span
data-x="concept-script-base-url">base URL</span>.</p></li>
</ol>

<div class="example">
Expand Down

0 comments on commit 0cca49d

Please sign in to comment.