diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module-assertions/serviceworker-dynamic-import.js')
-rw-r--r-- | testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module-assertions/serviceworker-dynamic-import.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module-assertions/serviceworker-dynamic-import.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module-assertions/serviceworker-dynamic-import.js new file mode 100644 index 0000000000..9466c6fbe4 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/json-module-assertions/serviceworker-dynamic-import.js @@ -0,0 +1,5 @@ +onmessage = e => { + e.waitUntil(import("./module.json", { assert: { type: "json" } }) + .then(module => e.source.postMessage("LOADED")) + .catch(error => e.source.postMessage("FAILED"))); + };
\ No newline at end of file |