Я получаю эту ошибку в Firebug, когда пытаюсь получить доступ к некоторым файлам CSS, размещенным на внешних доменах:
Security error" code: "1000
rules = styleSheets[i].cssRules;
Используемый мной код:
$(document).ready(function () {
$("p").live('mousedown', function getCSSRules(element) {
element = $(this);
var styleSheets = document.styleSheets;
var matchedRules = [],
rules, rule;
for (var i = 0; i < styleSheets.length; i++) {
rules = styleSheets[i].cssRules;
for (var j = 0; j < rules.length; j++) {
rule = rules[j];
if (element.is(rule.selectorText)) {
matchedRules.push(rule.selectorText);
}
}
}
alert(matchedRules);
});
});
Есть ли способ исправить это, помимо перемещения всех файлов CSS в одном домене?