Here is the code:
You\'ll notice the alert(document.styl
alert(document.styl
Try window.document.styleSheets[x].cssRules.length instead of document.styleSheets[x].cssRules.length. It will work on firefox without any security exception.
window.document.styleSheets[x].cssRules.length
document.styleSheets[x].cssRules.length