Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes issue when cssRules are inaccessilbe (#384)
When cssRules are inaccessible in a style sheet, getCSSRules will throw an exception trying to read them, and then the catch handler will fetch the css. But, when it goes to insert the rule, it has a bug where it uses sheet.cssRules.length, which causes an exception again and the rules are lost. This results in the error: Error inlining remote css file SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules This is referenced in a few issues such as issue #49.
- Loading branch information