Unverified Commit c0832c3f authored by Evan W. Patton's avatar Evan W. Patton Committed by GitHub

Fix PNG export when brower extensions inject CSS (#2379)

Change-Id: I305dca87f36e6d6659a3586cb9b3b014bbcafa89
parent a6d66e17
...@@ -38,7 +38,13 @@ goog.require('goog.Timer'); ...@@ -38,7 +38,13 @@ goog.require('goog.Timer');
console.warn("Cannot include styles from other hosts: "+sheets[i].href); console.warn("Cannot include styles from other hosts: "+sheets[i].href);
continue; continue;
} }
var rules = sheets[i].cssRules; var rules = null;
try {
rules = sheets[i].cssRules;
} catch (e) {
console.warn('Skipping a potentially injected stylesheet', e);
continue;
}
if (rules != null) { if (rules != null) {
for (var j = 0; j < rules.length; j++) { for (var j = 0; j < rules.length; j++) {
var rule = rules[j]; var rule = rules[j];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment