Skip to content

fails to work with dynamically defined handleEvent function #10

@lekoala

Description

@lekoala

Due to the line here

} else if((typeof listener === 'object') && (typeof listener.handleEvent === 'function')) {

if the handleEvent function is added dynamically (something that i like to do, because this way nobody can rebind it out of its scope), it will not work

I think it's quite safe to drop the check for the function itself. If it's an object, it needs to have a handleEvent, as defined in the addEventListenerApi : it's a function, or an object

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions