Skip to content

Commit 5ee6924

Browse files
F3n67utargos
authored andcommittedMay 12, 2024
events: replace NodeCustomEvent with CustomEvent
PR-URL: #43876 Refs: #43514 Reviewed-By: Anna Henningsen <[email protected]>
1 parent e0148e2 commit 5ee6924

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed
 

‎lib/internal/event_target.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -408,15 +408,6 @@ ObjectDefineProperties(CustomEvent.prototype, {
408408
detail: kEnumerableProperty,
409409
});
410410

411-
class NodeCustomEvent extends Event {
412-
constructor(type, options) {
413-
super(type, options);
414-
if (options?.detail) {
415-
this.detail = options.detail;
416-
}
417-
}
418-
}
419-
420411
// Weak listener cleanup
421412
// This has to be lazy for snapshots to work
422413
let weakListenersState = null;
@@ -837,7 +828,7 @@ class EventTarget {
837828
}
838829

839830
[kCreateEvent](nodeValue, type) {
840-
return new NodeCustomEvent(type, { detail: nodeValue });
831+
return new CustomEvent(type, { detail: nodeValue });
841832
}
842833
[customInspectSymbol](depth, options) {
843834
if (!isEventTarget(this))

0 commit comments

Comments
 (0)
Please sign in to comment.