mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Core: use interactive to evaluate dom ready, barring IE9-10
Fixes gh-2100
This commit is contained in:
@@ -70,10 +70,10 @@ jQuery.ready.promise = function( obj ) {
|
||||
|
||||
// Catch cases where $(document).ready() is called
|
||||
// after the browser event has already occurred.
|
||||
// We once tried to use readyState "interactive" here,
|
||||
// but it caused issues like the one
|
||||
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
|
||||
if ( document.readyState === "complete" ) {
|
||||
// Support: IE9-10 only
|
||||
// Older IE sometimes signals "interactive" too soon
|
||||
if ( document.readyState === "complete" ||
|
||||
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
||||
|
||||
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
||||
window.setTimeout( jQuery.ready );
|
||||
|
||||
Reference in New Issue
Block a user