fetch-error-2.html (531B)
1 <!DOCTYPE html> 2 <title>Handling of fetch errors, 2</title> 3 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script> 7 window.log = []; 8 9 const test_load = async_test( 10 "Test that failure to fetch dependency leads to error event on script."); 11 window.addEventListener("load", test_load.step_func_done(ev => { 12 assert_array_equals(log, ["script"]); 13 })); 14 </script> 15 <script type="module" src="./fetch-error-2.js" onerror="log.push('script')"></script>