fixed the way IE breaks parests on innerHTML

This commit is contained in:
Misko Hevery 2010-04-22 22:44:48 -07:00
parent 5fdb117b32
commit 0396054b4a
3 changed files with 9 additions and 6 deletions

View file

@ -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;
}

View file

@ -239,6 +239,11 @@ var ngSwitch = angularWidget('NG:SWITCH', function (element){
}
});
// this needs to be here for IE
foreach(cases, function(_case){
_case.element.remove();
});
element.html('');
return function(element){
var scope = this, childScope;

View file

@ -1,2 +1,2 @@
# java -jar lib/jstestdriver/JsTestDriver.jar --tests all
java -jar lib/jstestdriver/JsTestDriver.jar --tests all --config jsTestDriver-jquery.conf
java -jar lib/jstestdriver/JsTestDriver.jar --tests 'widget ng:switch' --config jsTestDriver-jquery.conf