Skip to content

Commit 75dd009

Browse files
F3n67umarco-ippolito
authored andcommitted
events: replace NodeCustomEvent with CustomEvent
PR-URL: #43876 Refs: #43514 Reviewed-By: Anna Henningsen <[email protected]>
1 parent 086626f commit 75dd009

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
@@ -412,15 +412,6 @@ ObjectDefineProperties(CustomEvent.prototype, {
412412
detail: kEnumerableProperty,
413413
});
414414

415-
class NodeCustomEvent extends Event {
416-
constructor(type, options) {
417-
super(type, options);
418-
if (options?.detail) {
419-
this.detail = options.detail;
420-
}
421-
}
422-
}
423-
424415
// Weak listener cleanup
425416
// This has to be lazy for snapshots to work
426417
let weakListenersState = null;
@@ -841,7 +832,7 @@ class EventTarget {
841832
}
842833

843834
[kCreateEvent](nodeValue, type) {
844-
return new NodeCustomEvent(type, { detail: nodeValue });
835+
return new CustomEvent(type, { detail: nodeValue });
845836
}
846837
[customInspectSymbol](depth, options) {
847838
if (!isEventTarget(this))

0 commit comments

Comments
 (0)