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

Side by Side Diff: lib/dom/templates/html/impl/impl_Element.darttemplate

Issue 10806016: Cleanup queryAll to return List<Element>. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix comment Created 8 years, 5 months 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // TODO(jacobr): use _Lists.dart to remove some of the duplicated 5 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
6 // functionality. 6 // functionality.
7 class _ChildrenElementList implements ElementList { 7 class _ChildrenElementList implements ElementList {
8 // Raw Element. 8 // Raw Element.
9 final _ElementImpl _element; 9 final _ElementImpl _element;
10 final _HTMLCollectionImpl _childElements; 10 final _HTMLCollectionImpl _childElements;
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 void set elements(Collection<Element> value) { 674 void set elements(Collection<Element> value) {
675 final elements = this.elements; 675 final elements = this.elements;
676 elements.clear(); 676 elements.clear();
677 elements.addAll(value); 677 elements.addAll(value);
678 } 678 }
679 679
680 ElementList get elements() => new _ChildrenElementList._wrap(this); 680 ElementList get elements() => new _ChildrenElementList._wrap(this);
681 681
682 _ElementImpl query(String selectors) => $dom_querySelector(selectors); 682 _ElementImpl query(String selectors) => $dom_querySelector(selectors);
683 683
684 ElementList queryAll(String selectors) => 684 List<Element> queryAll(String selectors) =>
685 new _FrozenElementList._wrap($dom_querySelectorAll(selectors)); 685 new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
686 686
687 _CssClassSet get classes() => new _CssClassSet(this); 687 _CssClassSet get classes() => new _CssClassSet(this);
688 688
689 void set classes(Collection<String> value) { 689 void set classes(Collection<String> value) {
690 _CssClassSet classSet = classes; 690 _CssClassSet classSet = classes;
691 classSet.clear(); 691 classSet.clear();
692 classSet.addAll(value); 692 classSet.addAll(value);
693 } 693 }
694 694
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 776
777 /** @domName Document.createElement */ 777 /** @domName Document.createElement */
778 $if FROG 778 $if FROG
779 // Optimization to improve performance until the frog compiler inlines this 779 // Optimization to improve performance until the frog compiler inlines this
780 // method. 780 // method.
781 factory Element.tag(String tag) native "return document.createElement(tag)"; 781 factory Element.tag(String tag) native "return document.createElement(tag)";
782 $else 782 $else
783 factory Element.tag(String tag) => _document.$dom_createElement(tag); 783 factory Element.tag(String tag) => _document.$dom_createElement(tag);
784 $endif 784 $endif
785 } 785 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698