Commit 0b73de95 authored by Elliott Sprehn's avatar Elliott Sprehn

Don't set expression attributes before they're bound.

We were cloning elements with all the attributes that contained
expressions like attrName="{{ foo }}" which meant we'd go through the
reflection process converting that value and also call the
attrNameChanged() callback and the attributeChanged() with the braced
string which the element didn't really want to know about.

After this patch we create a "clone source node" which is a copy of the
original element without the attributes that have the expressions and
use that when cloning, then we assign the properties using data binding
later.

R=abarth@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/868973002
parent fbc45545
......@@ -37,10 +37,10 @@
</sky-box>
<sky-box title='Checkboxes'>
<div><sky-checkbox id='checkbox' />Checkbox</div>
<div><sky-checkbox id='checkbox' checked='{{ checked }}'/>Checkbox</div>
<div class="output">highlight: {{ myCheckbox.highlight }}</div>
<div class="output">checked: {{ myCheckbox.checked }}</div>
<div><sky-checkbox id='checkbox' checked='{{ checked }}'/>Checkbox, default checked.</div>
<div><sky-checkbox id='checkbox' checked="true"/>Checkbox, default checked.</div>
<div class="output">checked: {{ checked }}</div>
</sky-box>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment