I am wondering how I can read CSS comments from a linked stylesheet.
I have this CSS sample loaded via:
<link rel="stylesheet" type="text/css" media="all" href="test.css" />
#test1{ border:1px solid #000; } #test2{ border:1px solid #000; } #test3{}
I am testing this in FF3. The following javascript reads the rules but does not read the comments in #test3 .
window.onload = function(){ s=document.styleSheets; for(i=0;i < s[0].cssRules.length;i++){ alert(s[0].cssRules[i].cssText); } }
geuis
source share