mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
When effect values are applied via bindings, use fromAbove gambit to avoid unnecessary wheel spinning. (This is now possible since we have fast lookup for readOnly where we want to avoid doing the set at all).
This commit is contained in:
parent
24bcedbf41
commit
c52090780a
@ -289,10 +289,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
(node.localName == 'input' && property == 'value')) {
|
||||
value = value == undefined ? '' : value;
|
||||
}
|
||||
// TODO(kschaaf): Ideally we'd use `fromAbove: true`, but this
|
||||
// breaks read-only properties
|
||||
// this.__setProperty(property, value, true, node);
|
||||
return node[property] = value;
|
||||
// setProperty using fromAbove to avoid spinning the wheel needlessly.
|
||||
var pinfo;
|
||||
if (!node._propertyInfo || !(pinfo = node._propertyInfo[property]) ||
|
||||
!pinfo.readOnly) {
|
||||
this.__setProperty(property, value, true, node);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user