We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1a153c commit 0dbb4d5Copy full SHA for 0dbb4d5
Source/Utilities/DOMReady.js
@@ -73,7 +73,11 @@ if (document.readyState) checks.push(function(){
73
return (state == 'loaded' || state == 'complete');
74
});
75
76
-if ('onreadystatechange' in document) document.addListener('readystatechange', check);
+if ('onreadystatechange' in document){
77
+ document.addListener('readystatechange', check);
78
+ var state = document.readyState;
79
+ if (state == 'loaded' || state == 'complete') domready();
80
+}
81
else shouldPoll = true;
82
83
if (shouldPoll) poll();
0 commit comments