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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 } | 156 } |
157 | 157 |
158 Iterable expand(Iterable f(Node element)) { | 158 Iterable expand(Iterable f(Node element)) { |
159 return IterableMixinWorkaround.expand(this, f); | 159 return IterableMixinWorkaround.expand(this, f); |
160 } | 160 } |
161 | 161 |
162 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f); | 162 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f); |
163 | 163 |
164 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f); | 164 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f); |
165 | 165 |
166 List<Node> toList({ bool growable: false }) => | 166 List<Node> toList({ bool growable: true }) => |
167 new List<Node>.from(this, growable: growable); | 167 new List<Node>.from(this, growable: growable); |
168 Set<Node> toSet() => new Set<Node>.from(this); | 168 Set<Node> toSet() => new Set<Node>.from(this); |
169 | 169 |
170 bool get isEmpty => this.length == 0; | 170 bool get isEmpty => this.length == 0; |
171 | 171 |
172 // From List<Node>: | 172 // From List<Node>: |
173 | 173 |
174 Iterable<Node> take(int n) { | 174 Iterable<Node> take(int n) { |
175 return IterableMixinWorkaround.takeList(this, n); | 175 return IterableMixinWorkaround.takeList(this, n); |
176 } | 176 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 final Node parent = this.parentNode; | 286 final Node parent = this.parentNode; |
287 parent.$dom_replaceChild(otherNode, this); | 287 parent.$dom_replaceChild(otherNode, this); |
288 } catch (e) { | 288 } catch (e) { |
289 | 289 |
290 }; | 290 }; |
291 return this; | 291 return this; |
292 } | 292 } |
293 | 293 |
294 $!MEMBERS | 294 $!MEMBERS |
295 } | 295 } |
OLD | NEW |