summaryrefslogtreecommitdiff
path: root/ext/web
diff options
context:
space:
mode:
authorcarles escrig royo <esroyo@gmail.com>2024-09-23 11:19:59 +0200
committerGitHub <noreply@github.com>2024-09-23 11:19:59 +0200
commit8f32a1577ec00d239bce39dd1f526b5678041b8b (patch)
tree73d09797f5bcb0a05573e4def6a23cec2fc6553e /ext/web
parent37cedefb4dc4f582311d7478d414d59469e4af5e (diff)
fix(ext/web): don't ignore capture in EventTarget.removeEventListener (#25788)
Diffstat (limited to 'ext/web')
-rw-r--r--ext/web/02_event.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/web/02_event.js b/ext/web/02_event.js
index f031d0aed..a3e40ab99 100644
--- a/ext/web/02_event.js
+++ b/ext/web/02_event.js
@@ -7,7 +7,6 @@
import { core, primordials } from "ext:core/mod.js";
const {
- ArrayPrototypeFilter,
ArrayPrototypeIncludes,
ArrayPrototypeIndexOf,
ArrayPrototypeMap,
@@ -982,12 +981,7 @@ class EventTarget {
);
const { listeners } = self[eventTargetData];
- if (callback !== null && listeners[type]) {
- listeners[type] = ArrayPrototypeFilter(
- listeners[type],
- (listener) => listener.callback !== callback,
- );
- } else if (callback === null || !listeners[type]) {
+ if (callback === null || !listeners[type]) {
return;
}