Skip to content
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

Don’t use eventContext for this of event listener objects. #576

Merged
merged 1 commit into from
Oct 22, 2018

Conversation

justinfagnani
Copy link
Collaborator

Fixes #571

listener.call(this.eventContext || this.element, event);
if (typeof this.value === 'function') {
this.value.call(this.eventContext || this.element, event);
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intentionally remove the typeof check for handleEvent?

Suggested change
} else {
} else if (typeof this.value.handleEvent === 'function') {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed irl, change was intentional, LGTM

Copy link
Member

@kevinpschaaf kevinpschaaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM following discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants