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

Unified Diff: lib/html/templates/html/impl/impl_NodeList.darttemplate

Issue 11169004: Add "contains" method to Collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed last illegal-access Created 8 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
Index: lib/html/templates/html/impl/impl_NodeList.darttemplate
diff --git a/lib/html/templates/html/impl/impl_NodeList.darttemplate b/lib/html/templates/html/impl/impl_NodeList.darttemplate
index 4e0f698837d5d22e19a5a9b32a08b3322f1e4ef1..7a42e98ceb4075ec6cb723ebbeb5032a6a2d7148 100644
--- a/lib/html/templates/html/impl/impl_NodeList.darttemplate
+++ b/lib/html/templates/html/impl/impl_NodeList.darttemplate
@@ -11,6 +11,8 @@ class _ListWrapper<E> implements List<E> {
Iterator<E> iterator() => _list.iterator();
+ bool contains(E element) => _list.contains(element);
+
void forEach(void f(E element)) => _list.forEach(f);
Collection map(f(E element)) => _list.map(f);
@@ -126,6 +128,8 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
_parent.$dom_replaceChild(value, this[index]);
}
+ bool contains(Node element) => _Collections.contains(this, element);
+
void forEach(void f(Node element)) => _Collections.forEach(this, f);
Collection map(f(Node element)) => _Collections.map(this, [], f);
« no previous file with comments | « lib/html/templates/html/impl/impl_Node.darttemplate ('k') | lib/html/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698