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

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

Issue 12391046: Add List.asMap(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
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 6b75c1324416915a1c09353e648e2bc68bada7ea..7e3d10d5f9f0f6619f635a79b2d3c501ae0433e4 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -260,6 +260,10 @@ class _ChildrenElementList implements List {
Element max([int compare(Element a, Element b)]) {
return IterableMixinWorkaround.max(this, compare);
}
+
+ Map<int, Element> asMap() {
+ return IterableMixinWorkaround.asMapList(this);
+ }
}
// TODO(jacobr): this is an inefficient implementation but it is hard to see
@@ -461,6 +465,10 @@ class _FrozenElementList implements List {
Element max([int compare(Element a, Element b)]) {
return IterableMixinWorkaround.max(this, compare);
}
+
+ Map<int, Element> asMap() {
+ return IterableMixinWorkaround.asMapList(this);
+ }
}
class _FrozenElementListIterator implements Iterator<Element> {

Powered by Google App Engine
This is Rietveld 408576698