maintain compatibility with older _notifyChange arguments.

This commit is contained in:
Steven Orvell 2015-11-05 18:28:54 -08:00
parent f2d5f44f3f
commit f5aec30d3d
2 changed files with 4 additions and 3 deletions

View File

@ -20,8 +20,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
_modelApi: {
_notifyChange: function(event, value) {
// use a cached event here (_useCache: true) for efficiency
_notifyChange: function(source, event, value) {
value = value === undefined ? this[source] : value;
event = event || Polymer.CaseMap.camelToDashCase(source) + '-changed';
this.fire(event, {value: value},
{bubbles: false, cancelable: false, _useCache: true});
},

View File

@ -41,7 +41,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
_notifyEffect: function(source, value, effect, old, fromAbove) {
if (!fromAbove) {
this._notifyChange(effect.event, value);
this._notifyChange(source, effect.event, value);
}
},