Closed mgiuffrida closed 5 years ago
@aomarks can you PTAL? We have had to patch this into Chromium (crbug.com/997852).
Looks correct (https://polymer-library.polymer-project.org/3.0/docs/devguide/gesture-events). Thanks for the PR.
Oops, sorry. I just realized that this PR was targeting the 1.x
branch. I'm going to need to roll this back. Polymer 1.x only defines Gestures.add
: https://github.com/Polymer/polymer/blob/1.x/src/standard/gestures.html#L341, so this change doesn't make sense.
Polymer 2 and 3 do define add
as a @deprecated
alias for addListener
:
2.x: https://github.com/Polymer/polymer/blob/2.x/lib/utils/gestures.html#L1104
3.x: https://github.com/Polymer/polymer/blob/master/lib/utils/gestures.js#L1081
And the 2.x
and 3.x
versions of this library do indeed call .add
(https://github.com/PolymerElements/iron-overlay-behavior/blob/2.x/iron-overlay-manager.html#L48 and https://github.com/PolymerElements/iron-overlay-behavior/blob/master/iron-overlay-manager.js#L49).
Are you sure you're using the right version of Polymer and/or this element library? If you'd still like to fix it in the 2.x
and/or latest branches, please send another PR.
I see. Chromium is pulling down Polymer 2.x so that's the branch I need to target -- I'll open a PR for master first though.
Replace call to deprecated Polymer.Gestures.add function with Polymer.Gestures.addListener.
Fixes a Closure compiler error (JSC_DEPRECATED_PROP_REASON).