From f5aec30d3da91391749af4740b12c6b128aa3d32 Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Thu, 5 Nov 2015 18:28:54 -0800 Subject: [PATCH] maintain compatibility with older `_notifyChange` arguments. --- src/lib/bind/accessors.html | 5 +++-- src/lib/bind/effects.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/bind/accessors.html b/src/lib/bind/accessors.html index bb078b3ff1..3f0f6a73d0 100644 --- a/src/lib/bind/accessors.html +++ b/src/lib/bind/accessors.html @@ -20,8 +20,9 @@ _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}); }, diff --git a/src/lib/bind/effects.html b/src/lib/bind/effects.html index 4aa3f13197..06be143364 100644 --- a/src/lib/bind/effects.html +++ b/src/lib/bind/effects.html @@ -41,7 +41,7 @@ _notifyEffect: function(source, value, effect, old, fromAbove) { if (!fromAbove) { - this._notifyChange(effect.event, value); + this._notifyChange(source, effect.event, value); } },