Shift the type setting in order to work with Webkit, and fix typo for IE.

This commit is contained in:
Cotton Hou
2011-12-11 14:37:53 +08:00
parent 9e48460eff
commit f255aefccf

View File

@@ -103,12 +103,12 @@ function loadStyles() {
new(less.Parser)().parse(styles[i].innerHTML || '', function (e, tree) {
var css = tree.toCSS();
var style = styles[i];
style.type = 'text/css';
try {
style.innerHTML = css;
} catch (_) {
style.styleSheets.cssText = css;
style.styleSheet.cssText = css;
}
style.type = 'text/css';
});
}
}