OLD | NEW |
(Empty) | |
| 1 <!doctype HTML> |
| 2 <html> |
| 3 <head> |
| 4 <title>html-script-module-errored</title> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> |
| 7 |
| 8 <script> |
| 9 // The case where Step 6 of |
| 10 // https://html.spec.whatwg.org/#internal-module-script-graph-fetching-procedure |
| 11 // fails. In such cases, fetch a module script graph returns a non-null |
| 12 // module script with instantiation state = "errored" |
| 13 // and module record = null. |
| 14 |
| 15 internals.runtimeFlags.moduleScriptsEnabled = true; |
| 16 |
| 17 function errorHandler0(ev) |
| 18 { |
| 19 console.log('window onerror - should be called'); |
| 20 console.log("Message = " + ev.message); |
| 21 } |
| 22 window.addEventListener("error", errorHandler0); |
| 23 |
| 24 </script> |
| 25 <script type="module" src="errored-root.js" onerror="console.log('script onerror
- should NOT be called')" onload="console.log('script onload - should be called
')"></script> |
| 26 <script> |
| 27 testRunner.waitUntilDone(); |
| 28 setTimeout(() => {testRunner.notifyDone();}, 100); |
| 29 </script> |
OLD | NEW |