Make sure that document.body exists, at least, in IE before the ready event is fired. Fixes #5443.
This commit is contained in:
parent
513053d62b
commit
81bfd9b870
|
@ -822,7 +822,8 @@ function bindReady() {
|
|||
// ensure firing before onload,
|
||||
// maybe late but safe also for iframes
|
||||
document.attachEvent("onreadystatechange", function() {
|
||||
if ( document.readyState === "complete" ) {
|
||||
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
|
||||
if ( document.readyState === "complete" && document.body ) {
|
||||
document.detachEvent( "onreadystatechange", arguments.callee );
|
||||
jQuery.ready();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue