You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I register a listener using once() and then read the listener array using listeners() I would expect to get an array with one entry pointing to my listener.
But actually listeners(eventName)[0].listener is actually pointing to my function as EventEmitter wrapped my listener for the once handling.
If I register a listener using on() then listeners(eventName)[0] points to my listener.
Is this intended?
The text was updated successfully, but these errors were encountered:
Some people have seen it as a bug, there was a PR at the core repository that would have fixed it: nodejs/node#5564
That proposal got a bit lost because there was another PR that did a similar thing, but only for the 'removeListener' event, not .listeners(). I think it would be fair to open a issue at https://github.com/nodejs/node/issues so that, at the very least, this problem does not get lost. Care to do that? :)
If I register a listener using once() and then read the listener array using listeners() I would expect to get an array with one entry pointing to my listener.
But actually listeners(eventName)[0].listener is actually pointing to my function as EventEmitter wrapped my listener for the once handling.
If I register a listener using on() then listeners(eventName)[0] points to my listener.
Is this intended?
The text was updated successfully, but these errors were encountered: