Make IE wait for readyState == complete since interactive seem to be able to be posted before the page is actually all there. Should resolve issue #133.
This commit is contained in:
parent
0236ee5a54
commit
c703d5fc4e
File diff suppressed because one or more lines are too long
|
@ -1954,7 +1954,13 @@ MathJax.Hub.Startup = {
|
|||
onLoad: function () {
|
||||
var onload = this.onload =
|
||||
MathJax.Callback(function () {MathJax.Hub.Startup.signal.Post("onLoad")});
|
||||
if (document.body && document.readyState && document.readyState !== "loading") {return [onload]}
|
||||
if (document.body && document.readyState)
|
||||
if (MathJax.Hub.Browser.isMSIE) {
|
||||
// IE can change from loading to interactive before
|
||||
// full page is ready, so go with complete (even though
|
||||
// that means we may have to wait longer).
|
||||
if (document.readyState === "complete") {return [onload]}
|
||||
} else if (document.readyState !== "loading") {return [onload]}
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener("load",onload,false);
|
||||
if (!this.params.noDOMContentEvent)
|
||||
|
|
Loading…
Reference in New Issue
Block a user