Skip to content

Commit 9e3dfcb

Browse files
committed
Event: Use window.document to get to document
1 parent 7cbf691 commit 9e3dfcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/event.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jQuery.event.fix = function( originalEvent ) {
3939
jQuery.event.add = function( elem, types ) {
4040

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

0 commit comments

Comments
 (0)