Skip to content

Commit

Permalink
When effect values are applied via bindings, use fromAbove gambit to …
Browse files Browse the repository at this point in the history
…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).
  • Loading branch information
Steven Orvell committed Nov 5, 2015
1 parent 24bcedb commit c520907
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/standard/effectBuilder.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,12 @@
(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);
}
}
},

Expand Down

0 comments on commit c520907

Please sign in to comment.