Comments (7)
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.
from elementquery.
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.
<link type="text/css" rel="stylesheet" media="screen" href="//fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic&subset=latin,cyrillic-ext,latin-ext,cyrillic">
Please fix this.
from elementquery.
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.
from elementquery.
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:
http://www.smashingmagazine.com/2013/06/25/media-queries-are-not-the-answer-element-query-polyfill/#comment-1221353
from elementquery.
Thank you @hellolindsay.
PS Is there a maintained fork of this lib?
from elementquery.
非常感谢!
from elementquery.
非常感谢!
Всегда пожалуйста!
from elementquery.
Related Issues (19)
- Enable dynamic element query resize detection HOT 1
- SASS HOT 1
- Add support for stylesheets loaded with an @import HOT 4
- Hidden elements don't always respect their query properties. HOT 2
- Add support of the AMD modules.
- [enhancement] Add missing bower.json. HOT 1
- ::before and ::after rules inside element query blocks cause Sizzle error HOT 2
- Unregister Selectors HOT 2
- Fire an event after elementQuery has finished HOT 1
- Preprocessor HOT 1
- Doent work in firefox HOT 2
- processStyleSheet function needs to use try/catch to avoid “SecurityError: The operation is insecure.”
- Not firing until resize HOT 1
- Firefox situation HOT 1
- To Make Web Part Responsive
- Bower support HOT 4
- Performance information HOT 3
- Wonky on using Maximize and restore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elementquery.