summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/web/02_event.js3
-rw-r--r--tools/wpt/expectation.json4
2 files changed, 4 insertions, 3 deletions
diff --git a/extensions/web/02_event.js b/extensions/web/02_event.js
index 6b2cc2c04..a8dd95dbd 100644
--- a/extensions/web/02_event.js
+++ b/extensions/web/02_event.js
@@ -929,7 +929,10 @@
this.removeEventListener(type, callback, options);
});
}
+ } else if (options?.signal === null) {
+ throw new TypeError("signal must be non-null");
}
+
ArrayPrototypePush(listeners[type], { callback, options });
}
diff --git a/tools/wpt/expectation.json b/tools/wpt/expectation.json
index f183bb866..cf03ced80 100644
--- a/tools/wpt/expectation.json
+++ b/tools/wpt/expectation.json
@@ -1977,9 +1977,7 @@
"event.any.html": true
},
"events": {
- "AddEventListenerOptions-signal.any.html": [
- "Passing null as the signal should throw"
- ],
+ "AddEventListenerOptions-signal.any.html": true,
"Event-isTrusted.any.html": true,
"EventTarget-constructible.any.html": true,
"Event-constructors.any.html": [