Open falali009 opened 5 years ago
it maybe chrome ‘s question~~ the maxdownloadnum
I got this error too, with only saving one SVG at a time. My error seemed to be related to the 2 Google fonts I have in my index.html
entry to Angular app
saveSvgAsPng.js:193 Stylesheet could not be loaded: https://fonts.googleapis.com/css?family=Raleway:400,500,600,700 DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
I had a similar issue with another library. Adding crossorigin="anonymous"
to any CSS <link>
fixed it
see: https://github.com/tsayen/dom-to-image/issues/205#issuecomment-395144061
Stylesheet could not be loaded: file:///C:/Users/DaiZhenPeng/Desktop/hanzi-writer-master/demo/styles.css DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules at file:///C:/Users/DaiZhenPeng/Desktop/hanzi-writer-master/demo/saveSvgAsPng.js:179:30 at Array.map ()
at styleSheetRules (file:///C:/Users/DaiZhenPeng/Desktop/hanzi-writer-master/demo/saveSvgAsPng.js:177:59)
at inlineCss (file:///C:/Users/DaiZhenPeng/Desktop/hanzi-writer-master/demo/saveSvgAsPng.js:202:5)
at file:///C:/Users/DaiZhenPeng/Desktop/hanzi-writer-master/demo/saveSvgAsPng.js:270:14
i want donwload 150+ svgs in once time;