Debian Codegraph @

testing/web-platform/mozilla/tests/html/semantics/scripting-1/the-script-element/circular-module-import-with-syntax-error.html

raw
1 <!doctype html>
2 <meta charset=utf-8>
3 <title>Load a module with circular imports and syntax error</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 module with circular imports and syntax error")
9 window.addEventListener("error", scriptError);
10 function scriptError() {
11 // An error is expected
12 test.done();
13 }
14 function scriptLoaded() {
15 test.step(() => assert_unreached("Should not load"));
16 test.done();
17 }
18 function testNoError() {
19 test.step(() => assert_unreached("No event expected here"));
20 test.done();
21 }
22 </script>
23 <script type="module"
24 src="./support/circular_error1.js"
25 onerror="testNoError()"
26 onload="scriptLoaded()"></script>