Skip to content

Commit 26818ff

Browse files
author
Alex Choi and Federico Silva Ponte
committed
allow this to get around the Firefox SecurityError issues
1 parent 77a1a0b commit 26818ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ElementQueries.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@
221221
*/
222222
this.init = function() {
223223
for (var i = 0, j = document.styleSheets.length; i < j; i++) {
224-
readRules(document.styleSheets[i].cssText || document.styleSheets[i].cssRules || document.styleSheets[i].rules);
224+
if (document.styleSheets[i].href && document.styleSheets[i].href.indexOf(document.domain) >= 0) {
225+
readRules(document.styleSheets[i].cssText || document.styleSheets[i].cssRules || document.styleSheets[i].rules);
226+
}
225227
}
226228
};
227229

0 commit comments

Comments
 (0)