Skip to content
Permalink
Browse files

Land Rich's fix for not using window.top to do frame detection. Fixes…

… #4787.
  • Loading branch information
richdougherty authored and jeresig committed Nov 11, 2009
1 parent c4c820e commit bf71575bb4f37321b71ef8ce21c8208ad2b192da
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/event.js
@@ -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.
You can’t perform that action at this time.