| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 List mappedBy(f(Node element)) { | 145 List mappedBy(f(Node element)) { |
| 146 return IterableMixinWorkaround.mappedByList(this, f); | 146 return IterableMixinWorkaround.mappedByList(this, f); |
| 147 } | 147 } |
| 148 | 148 |
| 149 Iterable<Node> where(bool f(Node element)) { | 149 Iterable<Node> where(bool f(Node element)) { |
| 150 return IterableMixinWorkaround.where(this, f); | 150 return IterableMixinWorkaround.where(this, f); |
| 151 } | 151 } |
| 152 | 152 |
| 153 Iterable expand(Iterable f(Node element)) { |
| 154 return IterableMixinWorkaround.expand(this, f); |
| 155 } |
| 156 |
| 153 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f); | 157 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f); |
| 154 | 158 |
| 155 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f); | 159 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f); |
| 156 | 160 |
| 157 List<Node> toList() => new List<Node>.from(this); | 161 List<Node> toList() => new List<Node>.from(this); |
| 158 Set<Node> toSet() => new Set<Node>.from(this); | 162 Set<Node> toSet() => new Set<Node>.from(this); |
| 159 | 163 |
| 160 bool get isEmpty => this.length == 0; | 164 bool get isEmpty => this.length == 0; |
| 161 | 165 |
| 162 // From List<Node>: | 166 // From List<Node>: |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 final Node parent = this.parentNode; | 280 final Node parent = this.parentNode; |
| 277 parent.$dom_replaceChild(otherNode, this); | 281 parent.$dom_replaceChild(otherNode, this); |
| 278 } catch (e) { | 282 } catch (e) { |
| 279 | 283 |
| 280 }; | 284 }; |
| 281 return this; | 285 return this; |
| 282 } | 286 } |
| 283 | 287 |
| 284 $!MEMBERS | 288 $!MEMBERS |
| 285 } | 289 } |
| OLD | NEW |