mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
Added a modified version of Felipe Gasper's IE<9 style injection error fix.
This commit is contained in:
@@ -101,8 +101,14 @@ function loadStyles() {
|
||||
for (var i = 0; i < styles.length; i++) {
|
||||
if (styles[i].type.match(typePattern)) {
|
||||
new(less.Parser)().parse(styles[i].innerHTML || '', function (e, tree) {
|
||||
styles[i].type = 'text/css';
|
||||
styles[i].innerHTML = tree.toCSS();
|
||||
var css = tree.toCSS();
|
||||
var style = styles[i];
|
||||
try {
|
||||
style.innerHTML = css;
|
||||
} catch (_) {
|
||||
style.styleSheets.cssText = css;
|
||||
}
|
||||
style.type = 'text/css';
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user