Skip to content

Commit

Permalink
Bug 1778686 [wpt PR 34741] - Remove ErrorEventInit's error's null def…
Browse files Browse the repository at this point in the history
…ault value, a=testonly

Automatic update from web-platform-tests
Remove ErrorEventInit's error's null default value

Per the spec change [1], this removes ErrorEventInit's default value
of null, which makes the error attribute have no null default.

This change has already shipped on WebKit and Gecko, and the change
makes Chromium match the spec and other implementations. This is tested
by this WPT:

wpt/html/webappapis/scripting/events/event-handler-processing-algorithm-error/document-synthetic-errorevent.html

[1] whatwg/html#7983

Fixed: 1332448
Change-Id: Ia64a62e8c5739ab278016a94b0c3b0419d6a68f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3749784
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1021841}

--

wpt-commits: 824d27822a6c110981a6bbb99dddbcdf8455f56a
wpt-pr: 34741
  • Loading branch information
Mason Freed authored and moz-wptsync-bot committed Jul 13, 2022
1 parent 5c8a81c commit d10cd17
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,20 @@
assert_equals(e.colno, 0);
assert_equals(e.error, undefined);
}, "Initial values of ErrorEvent members")

test(() => {
const e = new ErrorEvent("error", {error : null});
assert_equals(e.error, null);
}, "error member can be set to null")

test(() => {
const e = new ErrorEvent("error", {error : undefined});
assert_equals(e.error, undefined);
}, "error member can be set to undefined")

test(() => {
const e = new ErrorEvent("error", {error : "foo"});
assert_equals(e.error, "foo");
}, "error member can be set to arbitrary")

</script>

0 comments on commit d10cd17

Please sign in to comment.