Closed jabes closed 8 years ago
sorry for getting back to you this late (conference, out of the country, …)
Does the problem you're solving relate to this fix and if so, should we make them work the same way?
Your reply was faster than mine! Yes these are similar fixes that solve the same problem, however I would advocate you use more explicit checking rather than wrapping inside a try/catch because it's both more readable and more performant. https://stackoverflow.com/questions/3217294/javascript-try-catch-performance-vs-error-checking-code
Okay, after doing a little browser testing, it looks like Firefox also has a security issue with cross-domain stylesheets. Simply calling cssRules will throw a SecurityError so typeof is not enough. A try/catch should be used: http://stackoverflow.com/a/23613052
if you update the PR I'll try to merge it tomorrow
ping @jabes :)
Oops I forgot! Work is super hectic at the moment. I'll update the PR tomorrow I promise :)
+1
@rodneyrehm I have made a few commits that use a try/catch to check for access permissions on css rule lists to avoid throwing security errors.
Sorry for not getting to this for so long… I sqashed the PR and merged it locally: 7a63b40. (I excluded your Remove duplicate try catch commit, though)
Fixes a bug in IE that is triggered when a call to CSSRuleList is made on a remote stylesheet