Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5ee6924

Browse filesBrowse files
F3n67utargos
authored andcommitted
events: replace NodeCustomEvent with CustomEvent
PR-URL: #43876 Refs: #43514 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent e0148e2 commit 5ee6924
Copy full SHA for 5ee6924

File tree

Expand file treeCollapse file tree

1 file changed

+1
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-10
lines changed
Open diff view settings
Collapse file

‎lib/internal/event_target.js‎

Copy file name to clipboardExpand all lines: lib/internal/event_target.js
+1-10Lines changed: 1 addition & 10 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.