IE9 in IE9-standards mode crashes if you look at document.namespaces before document.readyState is 'complete', but setting up a fake namespace seems to cure that. This was causing MathJax to not render some pages in IE9.

This commit is contained in:
Davide P. Cervone 2012-02-29 11:32:55 -05:00
parent e441641727
commit 20ce1833cc
2 changed files with 6 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -2400,6 +2400,11 @@ MathJax.Hub.Startup = {
document.write('<?import namespace="m" implementation="#MathPlayer">');
browser.mpImported = true;
}
} else {
// Adding any namespace avoids a crash in IE9 in IE9-standards mode
// (any reference to document.namespaces before document.readyState is
// "complete" causes an "unspecified error" to be thrown)
document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink");
}
}
});