mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
maintain compatibility with older _notifyChange
arguments.
This commit is contained in:
parent
f2d5f44f3f
commit
f5aec30d3d
@ -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});
|
||||
},
|
||||
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user