From f255aefccfafef05048f531792a778ac4f8056ce Mon Sep 17 00:00:00 2001 From: Cotton Hou Date: Sun, 11 Dec 2011 14:37:53 +0800 Subject: [PATCH] Shift the type setting in order to work with Webkit, and fix typo for IE. --- lib/less/browser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/less/browser.js b/lib/less/browser.js index 77e59ae1..b38a3d59 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -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'; }); } }