We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0148e2 commit 5ee6924Copy full SHA for 5ee6924
lib/internal/event_target.js
@@ -408,15 +408,6 @@ ObjectDefineProperties(CustomEvent.prototype, {
408
detail: kEnumerableProperty,
409
});
410
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
-
420
// Weak listener cleanup
421
// This has to be lazy for snapshots to work
422
let weakListenersState = null;
@@ -837,7 +828,7 @@ class EventTarget {
837
828
}
838
829
839
830
[kCreateEvent](nodeValue, type) {
840
- return new NodeCustomEvent(type, { detail: nodeValue });
831
+ return new CustomEvent(type, { detail: nodeValue });
841
832
842
833
[customInspectSymbol](depth, options) {
843
834
if (!isEventTarget(this))
0 commit comments