Index: sdk/lib/html/html_common/filtered_element_list.dart |
diff --git a/sdk/lib/html/html_common/filtered_element_list.dart b/sdk/lib/html/html_common/filtered_element_list.dart |
index 5f1f961bac5a61d736ae06440674923b8c189dba..44768c4fcacfe18698896ff9e4e59a48f3d16fcc 100644 |
--- a/sdk/lib/html/html_common/filtered_element_list.dart |
+++ b/sdk/lib/html/html_common/filtered_element_list.dart |
@@ -108,6 +108,36 @@ class FilteredElementList implements List { |
return result; |
} |
+ void remove(Object element) { |
+ if (element is! Element) return; |
+ for (int i = 0; i < length; i++) { |
+ Element indexElement = this[i]; |
+ if (identical(indexElement, element)) { |
+ indexElement.remove(); |
+ return; |
+ } |
+ } |
+ } |
+ |
+ // Operations defined in terms of [Collections]' [remove]. |
+ |
+ void removeAll(Iterable elements) { |
+ // This should be optimized to not use [remove] directly. |
+ Collections.removeAll(this, elements); |
+ } |
+ |
+ void retainAll(Iterable elements) { |
+ Collections.retainAll(this, elements); |
+ } |
+ |
+ void removeMatching(bool test(Element element)) { |
+ Collections.removeMatching(this, test); |
+ } |
+ |
+ void retainMatching(bool test(Element element)) { |
+ Collections.retainMatching(this, test); |
+ } |
+ |
dynamic reduce(dynamic initialValue, |
dynamic combine(dynamic previousValue, Element element)) { |
return IterableMixinWorkaround.reduce(this, initialValue, combine); |
@@ -132,7 +162,6 @@ class FilteredElementList implements List { |
return this[index]; |
} |
- |
bool get isEmpty => _filtered.isEmpty; |
int get length => _filtered.length; |
Element operator [](int index) => _filtered[index]; |