Skip to content

Commit

Permalink
Event: Use window.document to get to document
Browse files Browse the repository at this point in the history
  • Loading branch information
dmethvin committed Nov 28, 2016
1 parent 7cbf691 commit 9e3dfcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/event.js
Expand Up @@ -39,7 +39,7 @@ jQuery.event.fix = function( originalEvent ) {
jQuery.event.add = function( elem, types ) {

// This misses the multiple-types case but that seems awfully rare
if ( elem === window && types === "load" && document.readyState === "complete" ) {
if ( elem === window && types === "load" && window.document.readyState === "complete" ) {
migrateWarn( "jQuery(window).on('load'...) called after load event occurred" );
}
return oldEventAdd.apply( this, arguments );
Expand Down

0 comments on commit 9e3dfcb

Please sign in to comment.