We include the CSS file via standard HTML STYLE tag.
Then we need the javascript code to access the CSS classes and attributes. in IE and Chrome all goes fine, but in Firefox it throws this exception:
uncaught exception: Security error (NS ERROR DOM SECURITY ERR)
here's the javascript code:
for (var i = 0; i != window.document.styleSheets.length; i++) {
rules = window.document.styleSheets.item(i);
if(rules.href.indexOf('someurl.com')){
break;
}
}
return rules.cssRules || rules.rules;
it works fine in IE, Chrome and Safari, but it doens't in Firefox and Opera.
any ideas? thanks in advance