We had a strange issue with Firefox 3.x and the access to document.styleSheets[x].cssRules (where x is a valid index in the styleSheets array).
It seems that if that property is accessed after the document.domain property is set then a security exception is throw:
[Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" ... ]
You can find a
bug report here (the bug has a strange history as it starts as a quicktime related issue)
This is a test case that reproduces the issue:
[syntax="HTML"]<html>
<head>
<link href="mycss.css" type="text/css" rel="stylesheet">
</head>
<body>
<script type="text/javascript">
document.domain="mysite.com";
var cssRules=document.styleSheets[0].cssRules;
</script>
</body>
</html>[/syntax]
How is this related to Lightstreamer?
usually on production environments you'll have the following Lightstreamer-related code:
[syntax="JS"]var pPage = new Lightstreamer.PushPage();
[...]
pPage.setDomain("mysite.com");
[...]
pPage.bind();
[/syntax]
during the bind call the domain set in the setDomain call is applied to the page, thus if after that call you try to access var cssRules=document.styleSheets[x].cssRules then you'll have an exception.
A work-around is to store the cssRules object before calling the bind method; doing so you should be able to access its properties even after such bind call.