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

Make Polymer gestures library safe for Closure property renaming (take 2). #5314

Merged
merged 4 commits into from
Aug 2, 2018

Conversation

aomarks
Copy link
Member

@aomarks aomarks commented Aug 2, 2018

#5312 needed some more changes, this should be ready to merge.

The issue here was that we were assuming that the method for a given
gesture would always match the string name of that gesture, e.g. that if
the gesture name was "mousedown" that we could call
gestureDefinition.mousedown. In actuality, gestureDefinition.mousedown
could be renamed by Closure, which would throw with "undefined is not a
function".

The fix is to move the GesturesRecognizer type into our externs, which
prevents those methods from being renamed.
Copy link
Member

@dfreedm dfreedm left a comment

Choose a reason for hiding this comment

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

LGTM

@aomarks aomarks merged commit 6847cf4 into master Aug 2, 2018
@aomarks aomarks deleted the gesture-compile branch August 2, 2018 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants