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

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

Issue 11931034: Add methods to Collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 11 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_Node.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index b96554051c0a7456ef2a49aa495e44873e46e96d..21069d6e6c45744e44be33fcf4031a20a5674b4c 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -90,6 +90,29 @@ $endif
return result;
}
+ void remove(Object object) {
+ if (object is! Node) return;
+ Node node = object;
+ if (!identical(this, node.parentNode)) return;
+ _this.$dom_removeChild(node);
+ }
+
+ void removeAll(Iterable elements) {
+ IterableMixinWorkaround.removeAll(this, elements);
+ }
+
+ void retainAll(Iterable elements) {
+ IterableMixinWorkaround.retainAll(this, elements);
+ }
+
+ void removeMatching(bool test(Node node)) {
+ IterableMixinWorkaround.removeMatching(this, test);
+ }
+
+ void retainMatching(bool test(Node node)) {
+ IterableMixinWorkaround.retainMatching(this, test);
+ }
+
void clear() {
_this.text = '';
}
« no previous file with comments | « tools/dom/templates/html/impl/impl_Element.darttemplate ('k') | tools/dom/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698