aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jqLite.js')
-rw-r--r--src/jqLite.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index 18589630..134c1e17 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -211,11 +211,9 @@ JQLite.prototype = {
html: function(value) {
if (isDefined(value)) {
- var parent = this[0], child;
- while(parent.childNodes.length) {
- child = parent.childNodes[0];
- jqLite(child).dealoc();
- parent.removeChild(child);
+ var i = 0, childNodes = this[0].childNodes;
+ for ( ; i < childNodes.length; i++) {
+ jqLite(childNodes[i]).dealoc();
}
this[0].innerHTML = value;
}