Index: lib/html/templates/immutable_list_mixin.darttemplate |
diff --git a/lib/html/templates/immutable_list_mixin.darttemplate b/lib/html/templates/immutable_list_mixin.darttemplate |
index ee45407aa0d2946acb947f411e6b12bcbbe6b224..d72fc5d1f84179d2eaeb58666f8b292f17a23cef 100644 |
--- a/lib/html/templates/immutable_list_mixin.darttemplate |
+++ b/lib/html/templates/immutable_list_mixin.darttemplate |
@@ -24,6 +24,12 @@ |
throw const UnsupportedOperationException("Cannot add to immutable List."); |
} |
+$if DEFINE_CONTAINS |
+ bool contains($E element) => _Collections.contains(this, element); |
+$else |
+ // contains() defined by IDL. |
+$endif |
+ |
void forEach(void f($E element)) => _Collections.forEach(this, f); |
Collection map(f($E element)) => _Collections.map(this, [], f); |