OLD | NEW |
1 <!-- | 1 <!-- |
2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 --> | 5 --> |
6 <import src="observe.sky" as="observe" /> | 6 <import src="observe.sky" as="observe" /> |
7 | 7 |
8 <script> | 8 <script> |
9 var stagingDocument = new Document(); | 9 var stagingDocument = new Document(); |
10 | 10 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 })); | 153 })); |
154 } else if (name == 'style' || name == 'class') { | 154 } else if (name == 'style' || name == 'class') { |
155 updateAttribute(node, name, observable.open(function(value) { | 155 updateAttribute(node, name, observable.open(function(value) { |
156 updateAttribute(node, name, value); | 156 updateAttribute(node, name, value); |
157 })); | 157 })); |
158 } else { | 158 } else { |
159 node[name] = observable.open(function(value) { | 159 node[name] = observable.open(function(value) { |
160 node[name] = value; | 160 node[name] = value; |
161 }); | 161 }); |
162 } | 162 } |
| 163 if (typeof node.addPropertyBinding == 'function') |
| 164 node.addPropertyBinding(this.name, observable); |
163 return observable; | 165 return observable; |
164 } | 166 } |
165 } | 167 } |
166 | 168 |
167 function parsePropertyDirective(value, property) { | 169 function parsePropertyDirective(value, property) { |
168 if (!value || !value.length) | 170 if (!value || !value.length) |
169 return; | 171 return; |
170 | 172 |
171 var result; | 173 var result; |
172 var offset = 0; | 174 var offset = 0; |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 iterators.delete(this.template); | 522 iterators.delete(this.template); |
521 this.closed = true; | 523 this.closed = true; |
522 } | 524 } |
523 } | 525 } |
524 | 526 |
525 module.exports = { | 527 module.exports = { |
526 createInstance: createInstance, | 528 createInstance: createInstance, |
527 registerElement: registerElement, | 529 registerElement: registerElement, |
528 }; | 530 }; |
529 </script> | 531 </script> |
OLD | NEW |