Skip to content

Commit

Permalink
Propagate custom perform the fetch steps through LoadRequestedModules
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Sep 28, 2022
1 parent b73221e commit e82302f
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -93457,10 +93457,12 @@ document.querySelector("button").addEventListener("click", bound);
</ol>
</li>

<li>
<p>Let <var>state</var> be Record { [[ParseError]]: null, [[Destination]]:
<var>destination</var> }.</p>
</li>
<li><p>Let <var>state</var> be Record { [[ParseError]]: null, [[Destination]]:
<var>destination</var>, [[PerformTheFetch]]: null }.</p></li>

<li><p>If the caller of this algorithm specified custom <span
data-x="fetching-scripts-perform-fetch">perform the fetch</span> steps, set
<var>state</var>.[[PerformTheFetch]] to such steps.</p></li>

<li>
<p>Let <var>loading promise</var> be <var>record</var>.<span
Expand Down Expand Up @@ -93663,7 +93665,9 @@ document.querySelector("button").addEventListener("click", bound);
<li><p><span>Fetch a single module script</span> given <var>url</var>, <var>settings
object</var>, <var>destination</var>, <var>options</var>, <var>settings object</var>,
<var>referrer</var>, <var>moduleRequest</var>, with the <var>top-level module fetch flag</var>
unset, and with <var>onComplete</var>.</p></li>
unset, and with <var>onComplete</var>. If the caller of this algorithm specified custom <span
data-x="fetching-scripts-perform-fetch">perform the fetch</span> steps, pass those along as
well.</p></li>
</ol>

<h5 id="creating-scripts">Creating scripts</h5>
Expand Down Expand Up @@ -95098,7 +95102,7 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
<li><p>Let <var>destination</var> be "script".</p></li>

<li><p>If <var>loadState</var> is not undefined, set <var>destination</var> to
<var>loadState.[[Destination]]</var>.</p></li>
<var>loadState</var>.[[Destination]].</p></li>

<li>
<p><span>Fetch a single imported module script</span> given <var>settings object</var>,
Expand Down Expand Up @@ -95133,6 +95137,11 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
<li><p>Perform <span>FinishLoadImportedModule</span>(<var>referrer</var>,
<var>moduleRequest</var>, <var>payload</var>, <var>completion</var>).</p></li>
</ol>

<p>If <var>loadState</var> is not undefined and <var>loadState</var>.[[PerformTheFetch]] is not
null, pass <var>loadState</var>.[[PerformTheFetch]] as <span>fetch a single imported module
script</span>'s custom <span data-x="fetching-scripts-perform-fetch">perform the fetch</span>
steps.</p>
</li>
</ol>

Expand Down

0 comments on commit e82302f

Please sign in to comment.