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 b1e18a47e7e60d96ae5a822c6d4e580ed63a38a4..868cf8ffc151edb419434bf9a0d492dfc454bdf0 100644 |
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate |
@@ -84,6 +84,17 @@ $endif |
} |
} |
+ void insert(int index, Node node) { |
+ if (index < 0 || index > length) { |
+ throw new RangeError.range(index, 0, length); |
+ } |
+ if (index == length) { |
+ _this.$dom_appendChild(node); |
+ } else { |
+ this_.insertBefore(node, this[index]); |
+ } |
+ } |
+ |
Node removeLast() { |
final result = last; |
if (result != null) { |