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

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

Issue 613063002: Make Node.nodes.insertAll take an end-positioned index. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « tests/html/node_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 85f7e12c5833362c4d1c2c469124437cd16be284..830714911d3c7cd90aa1f49e69c050f15c38188b 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -83,8 +83,12 @@ $endif
}
void insertAll(int index, Iterable<Node> iterable) {
- var item = this[index];
- _this.insertAllBefore(iterable, item);
+ if (index == length) {
+ addAll(iterable);
+ } else {
+ var item = this[index];
+ _this.insertAllBefore(iterable, item);
+ }
}
void setAll(int index, Iterable<Node> iterable) {
« no previous file with comments | « tests/html/node_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698