-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
events: replace NodeCustomEvent with CustomEvent #43876
Conversation
@@ -366,15 +366,6 @@ ObjectDefineProperties(CustomEvent.prototype, { | |||
detail: kEnumerableProperty, | |||
}); | |||
|
|||
class NodeCustomEvent extends Event { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you keep this as class NodeCustomEvent extends CustomEvent {}
, that might even be a bit nicer since it’s a way to differentiate between events coming from a user and events coming from a Node.js EventEmitter .emit()
call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you help me understand what specific usercase do we need to support? I don't understand in which scenario we would need to differentiate between events coming from a user and events coming from a Node.js EventEmitter .emit() call.
Landed in bd323b6 |
PR-URL: nodejs#43876 Refs: nodejs#43514 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: nodejs#43876 Refs: nodejs#43514 Reviewed-By: Anna Henningsen <anna@addaleax.net>
CustomEvent
is implemented at #43514,NodeCustomEvent
is the same asCustomEvent
, so I replaceNodeCustomEvent
withCustomEvent
in favor of web API. cc @daeyeonRefs: #43514 (comment)