Unable to access cssRules property DOMException: "CSSStyleSheet.cssRules getter: Not allowed to access cross-origin stylesheet"
See original GitHub issueBug reports:
My project uses Angular 9.1.0 and SCSS files and every time I attempt to convert an HTML element to canvas I get the following error
Unable to access cssRules property DOMException: "CSSStyleSheet.cssRules getter: Not allowed to access cross-origin stylesheet"
Does anyone know how to get around CORS in this case?
Specifications:
- html2canvas version tested with: 1.0.0-rc.5
- Browser & version: Firefox 74.0.1
- Operating system: Windows 10 Pro
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top Results From Across the Web
CSSStyleSheet.cssRules getter: Not allowed to access cross ...
With a chrome driver I get the error error reading property . I am trying to get the document.styleSheets of a page, but...
Read more >How to Fix the “Failed to Read the CSSRules Property From ...
If your CSS Stylesheet is from the same domain as the HTML, you will be able to access the document.styleSheets.get(index).cssRules property ...
Read more >Issue with CSSRule Plugin (DOMException) - GSAP
cssRules getter : Not allowed to access cross-origin stylesheet" ... read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
Read more >Accessing some font's "CSS" style sheet via styleSheet throws ...
Steps to reproduce Go to https://webkit.org/blog/ Open the developer console. Enter document.styleSheets[1].cssRules.
Read more >I can't download my blocks as image at all!
"Uncaught DOMException: CSSStyleSheet.cssRules getter: Not allowed to access cross-origin stylesheet line 9 > injectedScript:36". more details:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was having this problem with my Vue-powered project in Firefox 75.0 (macOS 10.15.3).
Weirdly, I my project doesn’t have any cross-origin stylesheets, so I went and debugged where it was tripping over and found that it was trying to read in styles that had been injected by the Ghostery browser extension. Might be worth disabling your extensions and see if that’s the cause of the problem?
I have disabled all extensions and working fine now. Thanks