Skip to content

Commit

Permalink
Land Rich's fix for not using window.top to do frame detection. Fixes #…
Browse files Browse the repository at this point in the history
  • 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.
11 changes: 8 additions & 3 deletions src/event.js
Expand Up @@ -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;
}
Expand Down

0 comments on commit bf71575

Please sign in to comment.