| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 _this.$dom_appendChild(iterable[0]); | 76 _this.$dom_appendChild(iterable[0]); |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 return; | 79 return; |
| 80 } | 80 } |
| 81 for (Node node in iterable) { | 81 for (Node node in iterable) { |
| 82 _this.$dom_appendChild(node); | 82 _this.$dom_appendChild(node); |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 void insertAt(int index, Node node) { |
| 87 if (index < 0 || index > length) throw RangeError(index); |
| 88 if (index == length) { |
| 89 _this.$dom_appendChild(node); |
| 90 } else { |
| 91 throw new UnimplementedError("insertAt on NodeLists"); |
| 92 } |
| 93 } |
| 94 |
| 86 Node removeLast() { | 95 Node removeLast() { |
| 87 final result = last; | 96 final result = last; |
| 88 if (result != null) { | 97 if (result != null) { |
| 89 _this.$dom_removeChild(result); | 98 _this.$dom_removeChild(result); |
| 90 } | 99 } |
| 91 return result; | 100 return result; |
| 92 } | 101 } |
| 93 | 102 |
| 94 Node removeAt(int index) { | 103 Node removeAt(int index) { |
| 95 var result = this[index]; | 104 var result = this[index]; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 final Node parent = this.parentNode; | 295 final Node parent = this.parentNode; |
| 287 parent.$dom_replaceChild(otherNode, this); | 296 parent.$dom_replaceChild(otherNode, this); |
| 288 } catch (e) { | 297 } catch (e) { |
| 289 | 298 |
| 290 }; | 299 }; |
| 291 return this; | 300 return this; |
| 292 } | 301 } |
| 293 | 302 |
| 294 $!MEMBERS | 303 $!MEMBERS |
| 295 } | 304 } |
| OLD | NEW |