Index: tools/dom/templates/html/impl/impl_Element.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate |
index 287e8e5b7fb5fd63b099318f2b12b562261d7009..53ca400c7c979b1f4008204608501d9bfbb17002 100644 |
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate |
@@ -201,9 +201,13 @@ class _ChildrenElementList implements List { |
throw new UnimplementedError(); |
} |
+ List sublist(int start, [int end]) { |
+ if (end == null) end = length; |
+ return new _FrozenElementList._wrap(Lists.getRange(this, start, end, [])); |
+ } |
+ |
List getRange(int start, int rangeLength) => |
- new _FrozenElementList._wrap(Lists.getRange(this, start, rangeLength, |
- [])); |
+ sublist(start, start + rangeLength); |
int indexOf(Element element, [int start = 0]) { |
return Lists.indexOf(this, element, start, this.length); |
@@ -411,8 +415,12 @@ class _FrozenElementList implements List { |
throw new UnsupportedError(''); |
} |
+ List<Element> sublist(int start, [int end]) { |
+ return new _FrozenElementList._wrap(_nodeList.sublist(start, end)); |
+ } |
+ |
List<Element> getRange(int start, int rangeLength) => |
- new _FrozenElementList._wrap(_nodeList.getRange(start, rangeLength)); |
+ sublist(start, start + rangeLength); |
int indexOf(Element element, [int start = 0]) => |
_nodeList.indexOf(element, start); |