Use if rather than try

This commit is contained in:
Cotton Hou
2011-12-12 15:57:50 +08:00
parent f255aefccf
commit 7a033af705

View File

@@ -104,10 +104,10 @@ function loadStyles() {
var css = tree.toCSS();
var style = styles[i];
style.type = 'text/css';
try {
style.innerHTML = css;
} catch (_) {
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.innerHTML = css;
}
});
}