Debian Codegraph @

testing/web-platform/mozilla/tests/html/semantics/scripting-1/the-script-element/async-dynamic-module.html

raw
1 <!doctype html>
2 <meta charset=utf-8>
3 <title>Load dynamically imported async modules</title>
4 <script src=/resources/testharness.js></script>
5 <script src=/resources/testharnessreport.js></script>
6 <script>
7 setup({allow_uncaught_exception: true});
8 var test = async_test("Load async dynamic module")
9 window.addEventListener("error", scriptError);
10 function scriptError(e) {
11 // An error is expected
12 test.step(() => assert_true(e.message !== "FAIL"));
13 }
14 function scriptLoaded() {
15 test.done();
16 }
17 function testNoError() {
18 test.step(() => assert_unreached("No event expected here"));
19 test.done();
20 }
21 </script>
22 <script type="module"
23 src="./support/async_dynamic_module.js"
24 onerror="testNoError()"
25 onload="scriptLoaded()"></script>