Index: client/html/src/DocumentFragmentWrappingImplementation.dart |
=================================================================== |
--- client/html/src/DocumentFragmentWrappingImplementation.dart (revision 942) |
+++ client/html/src/DocumentFragmentWrappingImplementation.dart (working copy) |
@@ -99,10 +99,14 @@ |
Iterator<Element> iterator() => _filtered.iterator(); |
List<Element> getRange(int start, int length) => |
_filtered.getRange(start, length); |
- int indexOf(Element element, int startIndex) => |
- _filtered.indexOf(element, startIndex); |
- int lastIndexOf(Element element, int startIndex) => |
- _filtered.lastIndexOf(element, startIndex); |
+ int indexOf(Element element, [int start = 0]) => |
+ _filtered.indexOf(element, start); |
+ |
+ int lastIndexOf(Element element, [int start = null]) { |
srdjan
2011/10/31 18:01:29
WHy not just [int start] (here and everywhere else
ngeoffray
2011/11/01 07:50:44
Last time I checked, not giving a default value fa
|
+ if (start === null) start = length - 1; |
+ return _filtered.lastIndexOf(element, start); |
+ } |
+ |
Element last() => _filtered.last(); |
} |
@@ -362,4 +366,4 @@ |
throw new UnsupportedOperationException( |
"WebKit drop zone can't be set for document fragments."); |
} |
-} |
+} |