aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
authorMisko Hevery2010-04-22 22:44:48 -0700
committerMisko Hevery2010-04-22 22:44:48 -0700
commit0396054b4a420972e16d0d9e965eb51ecd6f86a2 (patch)
tree5c30a4c2058e3ed112ae7507c4d9bbd417e49c2d /src/jqLite.js
parent5fdb117b32b72a908a3938bee8f1bce9854a0004 (diff)
downloadangular.js-0396054b4a420972e16d0d9e965eb51ecd6f86a2.tar.bz2
fixed the way IE breaks parests on innerHTML
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;
}