Skip to content
Permalink
Browse files
Land Rich's fix for not using window.top to do frame detection. Fixes #…
  • Loading branch information
richdougherty authored and jeresig committed Nov 11, 2009
1 parent c4c820e commit bf71575
Showing 1 changed file with 8 additions and 3 deletions.
@@ -849,10 +849,15 @@ function bindReady() {
}
});

// If IE and not an iframe
// If IE and not a frame
// continually check to see if the document is ready
// NOTE: DO NOT CHANGE TO ===, FAILS IN IE.
if ( document.documentElement.doScroll && window == window.top ) (function() {
var toplevel = false;

try {
toplevel = window.frameElement === undefined;
} catch(e){}

if ( document.documentElement.doScroll && toplevel ) (function() {
if ( jQuery.isReady ) {
return;
}

0 comments on commit bf71575

Please sign in to comment.