GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — events: replace NodeCustomEvent with CustomEvent · nodejs/node@5ee6924

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal
    • event_target.js
Expand file treeCollapse file tree
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)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.