Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(862)

Side by Side Diff: sdk/lib/html/html_common/lists.dart

Issue 46433003: Exposing raw DOM lists from wrappers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 html_common; 5 part of html_common;
6 6
7 class Lists { 7 class Lists {
8 8
9 /** 9 /**
10 * Returns the index in the array [a] of the given [element], starting 10 * Returns the index in the array [a] of the given [element], starting
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 static List getRange(List a, int start, int end, List accumulator) { 59 static List getRange(List a, int start, int end, List accumulator) {
60 if (start < 0) throw new RangeError.value(start); 60 if (start < 0) throw new RangeError.value(start);
61 if (end < start) throw new RangeError.value(end); 61 if (end < start) throw new RangeError.value(end);
62 if (end > a.length) throw new RangeError.value(end); 62 if (end > a.length) throw new RangeError.value(end);
63 for (int i = start; i < end; i++) { 63 for (int i = start; i < end; i++) {
64 accumulator.add(a[i]); 64 accumulator.add(a[i]);
65 } 65 }
66 return accumulator; 66 return accumulator;
67 } 67 }
68 } 68 }
69
70 /**
71 * For accessing underlying node lists, for dart:js interop.
72 */
73 class NodeListWrapper {
74 List<Node> get rawList;
75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698