From c73c43e197bf6f2e0309a9a50077c31bbcc52fd2 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 1 Oct 2013 08:46:53 -0400 Subject: [PATCH] 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. --- unpacked/MathJax.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js index 7210d8013..3498664ee 100644 --- a/unpacked/MathJax.js +++ b/unpacked/MathJax.js @@ -725,7 +725,7 @@ MathJax.fileversion = "2.2"; // // Create a SCRIPT tag to load the file // - JS: function (file,callback) { + JS: function (file,callback) { var script = document.createElement("script"); var timeout = BASE.Callback(["loadTimeout",this,file]); this.loading[file] = { @@ -772,9 +772,9 @@ MathJax.fileversion = "2.2"; if (node.nodeName === "STYLE" && node.styleSheet && typeof(node.styleSheet.cssText) !== 'undefined') { callback(this.STATUS.OK); // MSIE processes style immediately, but doesn't set its styleSheet! - } else if (window.chrome && typeof(window.sessionStorage) !== "undefined" && - node.nodeName === "STYLE") { - callback(this.STATUS.OK); // Same for Chrome 5 (beta), Grrr. + } else if (window.chrome && node.nodeName === "LINK") { + callback(this.STATUS.OK); // Chrome doesn't give access to cssRules for stylesheet in + // a link node, so we can't detect when it is loaded. } else if (isSafari2) { this.timer.start(this,[this.timer.checkSafari2,sheets++,callback],this.styleDelay); } else {