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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 Iterator<Node> get iterator => _this.childNodes.iterator; | 148 Iterator<Node> get iterator => _this.childNodes.iterator; |
149 | 149 |
150 // From List<Node>: | 150 // From List<Node>: |
151 | 151 |
152 // TODO(jacobr): this could be implemented for child node lists. | 152 // TODO(jacobr): this could be implemented for child node lists. |
153 // The exception we throw here is misleading. | 153 // The exception we throw here is misleading. |
154 void sort([Comparator<Node> compare]) { | 154 void sort([Comparator<Node> compare]) { |
155 throw new UnsupportedError("Cannot sort Node list"); | 155 throw new UnsupportedError("Cannot sort Node list"); |
156 } | 156 } |
157 | 157 |
158 void shuffle() { | 158 void shuffle([Random random]) { |
159 throw new UnsupportedError("Cannot shuffle Node list"); | 159 throw new UnsupportedError("Cannot shuffle Node list"); |
160 } | 160 } |
161 | 161 |
162 // FIXME: implement these. | 162 // FIXME: implement these. |
163 void setRange(int start, int end, Iterable<Node> iterable, | 163 void setRange(int start, int end, Iterable<Node> iterable, |
164 [int skipCount = 0]) { | 164 [int skipCount = 0]) { |
165 throw new UnsupportedError("Cannot setRange on Node list"); | 165 throw new UnsupportedError("Cannot setRange on Node list"); |
166 } | 166 } |
167 | 167 |
168 void fillRange(int start, int end, [Node fill]) { | 168 void fillRange(int start, int end, [Node fill]) { |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 Map<String, dynamic> get bindings => | 320 Map<String, dynamic> get bindings => |
321 TemplateElement.mdvPackage(this).bindings; | 321 TemplateElement.mdvPackage(this).bindings; |
322 | 322 |
323 /** Gets the template instance that instantiated this node, if any. */ | 323 /** Gets the template instance that instantiated this node, if any. */ |
324 @Experimental() | 324 @Experimental() |
325 TemplateInstance get templateInstance => | 325 TemplateInstance get templateInstance => |
326 TemplateElement.mdvPackage(this).templateInstance; | 326 TemplateElement.mdvPackage(this).templateInstance; |
327 | 327 |
328 $!MEMBERS | 328 $!MEMBERS |
329 } | 329 } |
OLD | NEW |