Skip to content

Commit c73c43e

Browse files
committed
Remove old Chrome 5-beta test for stylesheet checking, and replace it with a check for linked stylesheets (which don't currently work -- luckily they are not used). Resolves issue #584.
1 parent 02261ae commit c73c43e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

unpacked/MathJax.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ MathJax.fileversion = "2.2";
725725
//
726726
// Create a SCRIPT tag to load the file
727727
//
728-
JS: function (file,callback) {
728+
JS: function (file,callback) {
729729
var script = document.createElement("script");
730730
var timeout = BASE.Callback(["loadTimeout",this,file]);
731731
this.loading[file] = {
@@ -772,9 +772,9 @@ MathJax.fileversion = "2.2";
772772
if (node.nodeName === "STYLE" && node.styleSheet &&
773773
typeof(node.styleSheet.cssText) !== 'undefined') {
774774
callback(this.STATUS.OK); // MSIE processes style immediately, but doesn't set its styleSheet!
775-
} else if (window.chrome && typeof(window.sessionStorage) !== "undefined" &&
776-
node.nodeName === "STYLE") {
777-
callback(this.STATUS.OK); // Same for Chrome 5 (beta), Grrr.
775+
} else if (window.chrome && node.nodeName === "LINK") {
776+
callback(this.STATUS.OK); // Chrome doesn't give access to cssRules for stylesheet in
777+
// a link node, so we can't detect when it is loaded.
778778
} else if (isSafari2) {
779779
this.timer.start(this,[this.timer.checkSafari2,sheets++,callback],this.styleDelay);
780780
} else {

0 commit comments

Comments
 (0)