-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Closed
Labels
eventsIssues and PRs related to the events subsystem / EventEmitter.Issues and PRs related to the events subsystem / EventEmitter.
Description
- Version: 6.2.0 (with references to others)
- Platform: Windows 64 bit
- Subsystem: EventEmitter
It seems EventEmitter has an inconsistent handling of listeners installed via once().
- a listener listening on 'newListener' gets the function registered via once()
- a listener listening on 'removeListener' gets the function registered via once() since 6.2.0 because of events: pass the original listener added by EventEmitter#once to the removeListener handler #6394, in all other node versions the wrapper g() was returned.
- listeners() returns the wrapper g()
I think #5564 was targeting this topic also but was closed because #6394 was merged.
Not sure if this is a but or intended - or if changing this is seen as breaking change or not.
If it is kept like it is I would vote for updating documentation accordingly.
Metadata
Metadata
Assignees
Labels
eventsIssues and PRs related to the events subsystem / EventEmitter.Issues and PRs related to the events subsystem / EventEmitter.