Skip to content
Permalink
Browse files

Set background to none on our mock body and remove its contents to av…

…oid a crash in IE when removing it. Fixes #9028.
  • Loading branch information...
timmywil
timmywil committed May 2, 2011
1 parent 24a8ffb commit f1392d82089323ec9ef97b33909b960cc16c25b6
Showing with 4 additions and 1 deletion.
  1. +4 −1 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

0 comments on commit f1392d8

Please sign in to comment.
You can’t perform that action at this time.