OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>html-script-module-compilation-error-1</title> |
| 3 |
| 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <script> |
| 7 setup({allow_uncaught_exception: true}); |
| 8 |
| 9 var log = []; |
| 10 |
| 11 window.addEventListener("error", ev => log.push(ev.error)); |
| 12 |
| 13 var test_load = async_test("test_load"); |
| 14 window.addEventListener("load", test_load.step_func_done(ev => { |
| 15 assert_equals(log.length, 5); |
| 16 assert_equals(log[0].constructor, SyntaxError); |
| 17 assert_true(log.every(exn => exn === log[0])); |
| 18 })); |
| 19 |
| 20 function unreachable() { |
| 21 log.push("unexpected"); |
| 22 } |
| 23 </script> |
| 24 <script type="module" src="./syntaxerror.js" onerror="unreachable()"></script> |
| 25 <script type="module" src="./syntaxerror.js" onerror="unreachable()"></script> |
| 26 <script type="module" src="./syntaxerror-nested.js" onerror="unreachable()"></sc
ript> |
| 27 <script type="module" src="./syntaxerror.js" onerror="unreachable()"></script> |
| 28 <script type="module" src="./syntaxerror-nested.js" onerror="unreachable()"></sc
ript> |
OLD | NEW |