mirror of
https://github.com/less/less.js.git
synced 2026-02-03 11:35:08 -05:00
use : in ids, - isn't authorized as first character. use firstChild instead of childNodes[0]
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user