Code: Select all
var css = ".something { xxxxx: 1; display: none;";
var parser = Cc["@mozilla.org/xmlextras/domparser;1"].createInstance(Ci.nsIDOMParser),
doc1 = parser.parseFromString("<html xmlns='http://www.w3.org/1999/xhtml'/>", "application/xhtml+xml"),
doc = doc1.implementation.createDocument("http://www.w3.org/1999/xhtml", "cb3-parse", null),
style = doc.createElementNS("http://www.w3.org/1999/xhtml", "style");
style.appendChild(doc.createTextNode(css));
doc.documentElement.appendChild(style);
alert(doc.styleSheets[0].cssRules[0].cssText);
return doc.styleSheets[0];
Code: Select all
.something { display: none; }
Is there a PM setting / preference that would enable css errors like this to show in the error console?
Alan