anselmh / object-fit

Polyfill (mostly IE) for CSS object-fit property to fill-in/fit-in images into containers.
MIT License
996 stars 92 forks source link

Not working in Firefox 35 #39

Closed DerekDomino closed 9 years ago

DerekDomino commented 9 years ago

Firefox 35 does not implement object-fit, thus the importance of supporting in with your object-fit polyfill.

Firefox console reports

SecurityError: The operation is insecure. polyfill.object-fit.js:109

Line 109 is:

// get the style rules of this sheet
return toArray(stylesheet.cssRules);
anselmh commented 9 years ago

You’re probably including a CSS from another host which browsers do not allow (unless you have a proper CSP and CORS in place). You can also add disableCrossDomain to the initialization of the polyfill to avoid the external CSS being parsed.