From: jeresig Date: Sat, 13 Feb 2010 08:30:45 +0000 (-0500) Subject: Don't inject style elements using innerHTML as they will go away in IE. Fixes #5977. X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=c1ac9fdf45632f0e0d1f7183500ce45dde7319d7 Don't inject style elements using innerHTML as they will go away in IE. Fixes #5977. --- diff --git a/src/manipulation.js b/src/manipulation.js index a10feae..a58e52b 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -5,7 +5,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rtagName = /<([\w:]+)/, rtbody = /").html(valueObj(" "))[0].innerHTML, " ", "Make sure entities are passed through correctly." ); equals( jQuery("
").html(valueObj("&"))[0].innerHTML, "&", "Make sure entities are passed through correctly." ); + jQuery("#main").html(valueObj("")); + + equals( jQuery("#main").children().length, 1, "Make sure there is a child element." ); + equals( jQuery("#main").children()[0].nodeName.toUpperCase(), "STYLE", "And that a style element was inserted." ); + reset(); // using contents will get comments regular, text, and comment nodes var j = jQuery("#nonnodes").contents();