From: timmywil Date: Mon, 2 May 2011 15:57:01 +0000 (-0400) Subject: Set background to none on our mock body and remove its contents to avoid a crash... X-Git-Tag: 1.6~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f1392d82089323ec9ef97b33909b960cc16c25b6;p=jquery.git Set background to none on our mock body and remove its contents to avoid a crash in IE when removing it. Fixes #9028. --- diff --git a/src/support.js b/src/support.js index ea14bac63..41af06322 100644 --- a/src/support.js +++ b/src/support.js @@ -142,7 +142,9 @@ jQuery.support = (function() { width: 0, height: 0, border: 0, - margin: 0 + margin: 0, + // Set background to avoid IE crashes when removing (#9028) + background: "none" }; for ( i in bodyStyle ) { body.style[ i ] = bodyStyle[ i ]; @@ -207,6 +209,7 @@ jQuery.support = (function() { } // Remove the body element we added + body.innerHTML = ""; document.documentElement.removeChild( body ); // Technique from Juriy Zaytsev