diff --git a/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks.html b/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/basic.html similarity index 66% rename from html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks.html rename to html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/basic.html index ee1241f14cdbb63..f36bb693da64289 100644 --- a/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks.html +++ b/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/basic.html @@ -3,20 +3,7 @@ diff --git a/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/ticker.js b/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/ticker.js new file mode 100644 index 000000000000000..2d655b4dafd5487 --- /dev/null +++ b/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/ticker.js @@ -0,0 +1,13 @@ +export function ticker(max) { + let i = 0; + let stop = false; + Promise.resolve().then(function loop() { + if (stop || i >= max) return; + i++; + Promise.resolve().then(loop); + }); + return () => { + stop = true; + return i; + }; +}; diff --git a/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/with-import-assertions.html b/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/with-import-assertions.html new file mode 100644 index 000000000000000..2d63ca7fb9a923d --- /dev/null +++ b/html/semantics/scripting-1/the-script-element/module/dynamic-import/microtasks/with-import-assertions.html @@ -0,0 +1,18 @@ + +Dynamic import interaction with microtask queue + + +