diff --git a/lib/less/browser.js b/lib/less/browser.js index 69548739..96edf39d 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -107,7 +107,7 @@ function createCSS(styles, sheet, lastModified) { // If there is no title set, use the filename, minus the extension title = sheet.title || sheet.href.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1]; - id = '-less-' + title; + id = 'less:' + title; // If the stylesheet doesn't exist, create a new node if ((css = document.getElementById(id)) === null) { @@ -255,7 +255,7 @@ function error(e, href) { if (less.env == 'development') { timer = setInterval(function () { if (document.body) { - document.body.insertBefore(elem, document.body.childNodes[0]); + document.body.insertBefore(elem, document.body.firstChild); clearInterval(timer); } }, 10);