From e82302fde5ca62986a6ec523e3475b22b8ae4934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Wed, 28 Sep 2022 13:05:43 +0200 Subject: [PATCH] Propagate custom perform the fetch steps through LoadRequestedModules --- source | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/source b/source index 3d84aef495a..dbe5c29de58 100644 --- a/source +++ b/source @@ -93457,10 +93457,12 @@ document.querySelector("button").addEventListener("click", bound); -
  • -

    Let state be Record { [[ParseError]]: null, [[Destination]]: - destination }.

    -
  • +
  • Let state be Record { [[ParseError]]: null, [[Destination]]: + destination, [[PerformTheFetch]]: null }.

  • + +
  • If the caller of this algorithm specified custom perform the fetch steps, set + state.[[PerformTheFetch]] to such steps.

  • Let loading promise be record.

    Fetch a single module script given url, settings object, destination, options, settings object, referrer, moduleRequest, with the top-level module fetch flag - unset, and with onComplete.

  • + unset, and with onComplete. If the caller of this algorithm specified custom perform the fetch steps, pass those along as + well.

    Creating scripts
    @@ -95098,7 +95102,7 @@ import "https://example.com/foo/../module2.mjs";
  • Let destination be "script".

  • If loadState is not undefined, set destination to - loadState.[[Destination]].

  • + loadState.[[Destination]].

  • Fetch a single imported module script given settings object, @@ -95133,6 +95137,11 @@ import "https://example.com/foo/../module2.mjs";

  • Perform FinishLoadImportedModule(referrer, moduleRequest, payload, completion).

  • + +

    If loadState is not undefined and loadState.[[PerformTheFetch]] is not + null, pass loadState.[[PerformTheFetch]] as fetch a single imported module + script's custom perform the fetch + steps.