Skip to content

EventEmitter.listener() returns different function then that one registered #171

@Flarna

Description

@Flarna

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions