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

Unified Diff: lib/html/templates/html/impl/impl_DocumentFragment.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_DocumentFragment.darttemplate
diff --git a/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate b/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
index 229d58279eed495e8064d137666c864869a30b7b..7fc2d55742760fb7d1f481b3f80ced53f2a527bc 100644
--- a/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
+++ b/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
@@ -15,6 +15,10 @@ class _FilteredElementList implements List {
List<Element> get _filtered =>
new List.from(_childNodes.filter((n) => n is Element));
+ bool contains(Element element) {
+ return element is Element && _childNodes.contains(element);
+ }
+
void forEach(void f(Element element)) {
_filtered.forEach(f);
}
« no previous file with comments | « lib/html/templates/html/impl/impl_Document.darttemplate ('k') | lib/html/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698