| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Lazy implementation of the child nodes of an element that does not request | 8 * Lazy implementation of the child nodes of an element that does not request |
| 9 * the actual child nodes of an element until strictly necessary greatly | 9 * the actual child nodes of an element until strictly necessary greatly |
| 10 * improving performance for the typical cases where it is not required. | 10 * improving performance for the typical cases where it is not required. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void add(Node value) { | 62 void add(Node value) { |
| 63 _this.$dom_appendChild(value); | 63 _this.$dom_appendChild(value); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void addLast(Node value) { | 66 void addLast(Node value) { |
| 67 _this.$dom_appendChild(value); | 67 _this.$dom_appendChild(value); |
| 68 } | 68 } |
| 69 | 69 |
| 70 | 70 |
| 71 void addAll(Iterable<Node> iterable) { | 71 void addAll(Iterable<Node> iterable) { |
| 72 if (iterable is _ChildNodeListLazy) { |
| 73 iterable = new List.from(iterable); |
| 74 } |
| 72 for (Node node in iterable) { | 75 for (Node node in iterable) { |
| 73 _this.$dom_appendChild(node); | 76 _this.$dom_appendChild(node); |
| 74 } | 77 } |
| 75 } | 78 } |
| 76 | 79 |
| 77 Node removeLast() { | 80 Node removeLast() { |
| 78 final result = last; | 81 final result = last; |
| 79 if (result != null) { | 82 if (result != null) { |
| 80 _this.$dom_removeChild(result); | 83 _this.$dom_removeChild(result); |
| 81 } | 84 } |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 final Node parent = this.parentNode; | 283 final Node parent = this.parentNode; |
| 281 parent.$dom_replaceChild(otherNode, this); | 284 parent.$dom_replaceChild(otherNode, this); |
| 282 } catch (e) { | 285 } catch (e) { |
| 283 | 286 |
| 284 }; | 287 }; |
| 285 return this; | 288 return this; |
| 286 } | 289 } |
| 287 | 290 |
| 288 $!MEMBERS | 291 $!MEMBERS |
| 289 } | 292 } |
| OLD | NEW |