We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 086626f commit 75dd009Copy full SHA for 75dd009
lib/internal/event_target.js
@@ -412,15 +412,6 @@ ObjectDefineProperties(CustomEvent.prototype, {
412
detail: kEnumerableProperty,
413
});
414
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
-
424
// Weak listener cleanup
425
// This has to be lazy for snapshots to work
426
let weakListenersState = null;
@@ -841,7 +832,7 @@ class EventTarget {
841
832
}
842
833
843
834
[kCreateEvent](nodeValue, type) {
844
- return new NodeCustomEvent(type, { detail: nodeValue });
835
+ return new CustomEvent(type, { detail: nodeValue });
845
836
846
837
[customInspectSymbol](depth, options) {
847
838
if (!isEventTarget(this))
0 commit comments