Skip to content

Commit 4098a39

Browse files
committed
events: replace NodeCustomEvent with CustomEvent
1 parent cbbd91d commit 4098a39

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lib/internal/event_target.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -366,15 +366,6 @@ ObjectDefineProperties(CustomEvent.prototype, {
366366
detail: kEnumerableProperty,
367367
});
368368

369-
class NodeCustomEvent extends Event {
370-
constructor(type, options) {
371-
super(type, options);
372-
if (options?.detail) {
373-
this.detail = options.detail;
374-
}
375-
}
376-
}
377-
378369
// Weak listener cleanup
379370
// This has to be lazy for snapshots to work
380371
let weakListenersState = null;
@@ -705,7 +696,7 @@ class EventTarget {
705696
}
706697

707698
[kCreateEvent](nodeValue, type) {
708-
return new NodeCustomEvent(type, { detail: nodeValue });
699+
return new CustomEvent(type, { detail: nodeValue });
709700
}
710701
[customInspectSymbol](depth, options) {
711702
if (!isEventTarget(this))

0 commit comments

Comments
 (0)