| 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 3e0080a1f7be6021899ee96906afeb79e430188e..3abcc2510836f35c44177012240a2816d39b93c9 100644
|
| --- a/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| @@ -15,8 +15,14 @@ class _ChildrenElementList implements List {
|
| : _childElements = element.$dom_children,
|
| _element = element;
|
|
|
| - List<Element> toList() {
|
| - final output = new List<Element>.fixedLength(_childElements.length);
|
| + List<Element> toList({ bool growable: false }) {
|
| + final output;
|
| + if (growable) {
|
| + output = <Element>[];
|
| + output.length = _childElements.length;
|
| + } else {
|
| + output = new List<Element>(_childElements.length);
|
| + }
|
| for (int i = 0, len = _childElements.length; i < len; i++) {
|
| output[i] = _childElements[i];
|
| }
|
| @@ -312,7 +318,8 @@ class _FrozenElementList implements List {
|
| return false;
|
| }
|
|
|
| - List<Element> toList() => new List<Element>.from(this);
|
| + List<Element> toList({ bool growable: false }) =>
|
| + new List<Element>.from(this, growable: growable);
|
| Set<Element> toSet() => new Set<Element>.from(this);
|
|
|
| Iterable<Element> take(int n) {
|
|
|