| 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 close() { | 448 close() { |
| 449 if (this.closed) | 449 if (this.closed) |
| 450 return; | 450 return; |
| 451 this.unobserve(); | 451 this.unobserve(); |
| 452 for (var i = 0; i < this.instances.length; i++) { | 452 for (var i = 0; i < this.instances.length; i++) { |
| 453 this.instances[i].close(); | 453 this.instances[i].close(); |
| 454 } | 454 } |
| 455 | 455 |
| 456 this.instances.length = 0; | 456 this.instances.length = 0; |
| 457 | 457 |
| 458 if (this.ifBinding) | 458 if (this.ifObserver) |
| 459 this.ifBinding.close(); | 459 this.ifObserver.close(); |
| 460 if (this.binding) | 460 if (this.valueObserver) |
| 461 this.binding.close(); | 461 this.valueObserver.close(); |
| 462 | 462 |
| 463 iterators.delete(this.template); | 463 iterators.delete(this.template); |
| 464 this.closed = true; | 464 this.closed = true; |
| 465 } | 465 } |
| 466 } | 466 } |
| 467 | 467 |
| 468 module.exports = { | 468 module.exports = { |
| 469 createInstance: createInstance, | 469 createInstance: createInstance, |
| 470 }; | 470 }; |
| 471 </script> | 471 </script> |
| OLD | NEW |