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

Unified Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 46433003: Exposing raw DOM lists from wrappers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/impl/impl_Node.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16396fa85d259b65b6f098ee4494bb8d596e7d72..2b36b4b4dac8a8c179b3d73bc075ef35338560f4 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -4,7 +4,8 @@
part of $LIBRARYNAME;
-class _ChildrenElementList extends ListBase<Element> {
+class _ChildrenElementList extends ListBase<Element>
+ implements NodeListWrapper {
// Raw Element.
final Element _element;
final HtmlCollection _childElements;
@@ -157,6 +158,8 @@ class _ChildrenElementList extends ListBase<Element> {
if (length > 1) throw new StateError("More than one element");
return first;
}
+
+ List<Node> get rawList => _element._childElements;
justinfagnani 2013/10/26 01:32:26 why isn't this just => _childElements ?
blois 2013/10/26 17:55:17 Done.
}
/**
@@ -255,7 +258,8 @@ $!STREAM_GETTER_SIGNATURES
// a better option given that we cannot quite force NodeList to be an
// ElementList as there are valid cases where a NodeList JavaScript object
// contains Node objects that are not Elements.
-class _FrozenElementList<T extends Element> extends ListBase<T> implements ElementList {
+class _FrozenElementList<T extends Element> extends ListBase<T>
+ implements ElementList, NodeListWrapper {
final List<Node> _nodeList;
// The subset of _nodeList that are Elements.
List<Element> _elementList;
@@ -306,6 +310,9 @@ class _FrozenElementList<T extends Element> extends ListBase<T> implements Eleme
CssRect get borderEdge => _elementList.first.borderEdge;
CssRect get marginEdge => _elementList.first.marginEdge;
+
+ List<Node> get rawList => _nodeList;
+
$!ELEMENT_STREAM_GETTERS
}
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/impl/impl_Node.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698