mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
We now use the "report an exception" AO when a script has an execution error. This has mostly replaced the older "report the exception" AO in various specifications. Using this newer AO ensures that `window.onerror` is invoked when a script has an execution error.
17 lines
370 B
HTML
17 lines
370 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
asyncTest(done => {
|
|
window.addEventListener("error", (event) => {
|
|
println(`onerror event fired: ${event.error}`);
|
|
done();
|
|
});
|
|
|
|
try {
|
|
throw new Error("FAIL");
|
|
} catch (e) {}
|
|
|
|
throw new Error("Uncaught error");
|
|
});
|
|
</script>
|