-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Won't work in Firefox: "SecurityError: The operation is insecure." #10
Comments
I've managed to locate the problem. The error happens due to this issue: Firefox not able to enumerate document.styleSheets[].cssRules[] for cross-domain stylesheets. When i comment out a Google Fonts stylesheet, elementQuery starts working in Firefox.
Please fix this. |
Sorry, can't fix as it is the security model that some browsers chose. However, there is a workaround documented; please see "Expanded Support" section of the related Smashing Magazine article. |
Ain't it possible to make ElementQuery ignore external stylesheets? Make it optional maybe? Tell ElementQuery explicitly which stylesheets to parse? The issue with Firefox is pretty huge. |
I have found a fix for this -- you can modify the elementQuery.js source code and add a line of code. External stylesheets still wont load, but they will fail elegantly without the error or it's side effects: |
Thank you @hellolindsay. PS Is there a maintained fork of this lib? |
非常感谢! |
Всегда пожалуйста! |
Hi!
Firefox 25.0.1.
elementQuery produces:
It works in other browsers.
The text was updated successfully, but these errors were encountered: