Skip to content

Commit

Permalink
HTML: self.reportError()
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jul 21, 2021
1 parent 6cb0daf commit adcb5b6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions html/webappapis/scripting/reporterror.any.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test(t => {
let happened = false;
self.onerror = e => {
happened = true;
alert(typeof e);
assert_equals(e.error, 1);
};
self.addEventListener("x", () => { throw 1 });
self.dispatchEvent(new Event("x"));
//self.reportError(1);
assert_true(happened);
});

0 comments on commit adcb5b6

Please sign in to comment.