| 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 a2ea4fa5a45d8f68655e5b9cdac8f28e036ea924..d45b265d895c1a6851480bfb552727fbd1d9585c 100644
|
| --- a/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| @@ -264,8 +264,8 @@ $!STREAM_GETTER_SIGNATURES
|
| // declared to return `ElementList`. This provides all the static analysis
|
| // benefit so there is no need for this class have a constrained type parameter.
|
| //
|
| -class _FrozenElementList extends ListBase<Element>
|
| - implements ElementList<Element>, NodeListWrapper {
|
| +class _FrozenElementList<E extends Element> extends ListBase<E>
|
| + implements ElementList<E>, NodeListWrapper {
|
| final List<Node> _nodeList;
|
|
|
| $if JSINTEROP
|
| @@ -280,9 +280,9 @@ $endif
|
|
|
| int get length => _nodeList.length;
|
|
|
| - Element operator [](int index) => _nodeList[index];
|
| + E operator [](int index) => _nodeList[index] as E;
|
|
|
| - void operator []=(int index, Element value) {
|
| + void operator []=(int index, E value) {
|
| throw new UnsupportedError('Cannot modify list');
|
| }
|
|
|
| @@ -290,7 +290,7 @@ $endif
|
| throw new UnsupportedError('Cannot modify list');
|
| }
|
|
|
| - void sort([Comparator<Element> compare]) {
|
| + void sort([Comparator<E> compare]) {
|
| throw new UnsupportedError('Cannot sort list');
|
| }
|
|
|
| @@ -298,11 +298,11 @@ $endif
|
| throw new UnsupportedError('Cannot shuffle list');
|
| }
|
|
|
| - Element get first => _nodeList.first;
|
| + E get first => _nodeList.first as E;
|
|
|
| - Element get last => _nodeList.last;
|
| + E get last => _nodeList.last as E;
|
|
|
| - Element get single => _nodeList.single;
|
| + E get single => _nodeList.single as E;
|
|
|
| CssClassSet get classes => new _MultiElementCssClassSet(this);
|
|
|
| @@ -611,8 +611,8 @@ $endif
|
| * [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
|
| */
|
| @DomName('Element.querySelectorAll')
|
| - ElementList<Element> querySelectorAll(String selectors) =>
|
| - new _FrozenElementList._wrap(_querySelectorAll(selectors));
|
| + ElementList/*<T>*/ querySelectorAll/*<T extends Element>*/(String selectors) =>
|
| + new _FrozenElementList/*<T>*/._wrap(_querySelectorAll(selectors));
|
|
|
| /**
|
| * Alias for [querySelector]. Note this function is deprecated because its
|
|
|