Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
perf(dom): improve dom cloning speed
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery authored and chirayuk committed Aug 7, 2014
1 parent fb34431 commit dec8a97
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/core_dom/common.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
part of angular.core.dom_internal;

List<dom.Node> cloneElements(elements) => elements.map((el) => el.clone(true)).toList();
List<dom.Node> cloneElements(List<dom.Node> elements) {
int length = elements.length;
var clones = new List<dom.Node>(length);
for(var i=0; i < length; i++) {
clones[i] = elements[i].clone(true);
}
return clones;
}

class MappingParts {
final String attrName;
Expand Down

0 comments on commit dec8a97

Please sign in to comment.