mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
In _notifyListener
, only use e.detail
if the event has a detail. This is necessary for ::eventName
compatibility where eventName
is a native event like change
.
This commit is contained in:
parent
139257ba44
commit
3ece552db5
@ -179,8 +179,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
// handling is queue/defered until then.
|
||||
_notifyListener: function(fn, e) {
|
||||
if (!Polymer.Bind._isEventBogus(e, e.target)) {
|
||||
var value = e.detail.value;
|
||||
var path = e.detail.path;
|
||||
var value, path;
|
||||
if (e.detail) {
|
||||
value = e.detail.value;
|
||||
path = e.detail.path;
|
||||
}
|
||||
if (!this._clientsReadied) {
|
||||
this._queueHandler([fn, e.target, value, path]);
|
||||
} else {
|
||||
|
@ -257,7 +257,7 @@ suite('single-element binding effects', function() {
|
||||
test('custom notification event to path', function() {
|
||||
el.clearObserverCounts();
|
||||
el.$.boundChild.customEventObjectValue = 84;
|
||||
el.fire('change', null, {node: el.$.boundChild});
|
||||
el.$.boundChild.dispatchEvent(new Event('change'));
|
||||
assert.equal(el.customEventObject.value, 84, 'custom bound path incorrect');
|
||||
assert.equal(el.observerCounts.customEventObjectValueChanged, 1, 'custom bound path observer not called');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user