-
Notifications
You must be signed in to change notification settings - Fork 147
Description
Currently, trying to host SVGs with symbols on CDN and then using them on your page through USE tag to allow color changes with currentColor results with error: Unsafe attempt to load URL. There is a bug for chromium suggesting it should follow CORS policies providing ability to allow such references:
https://bugs.chromium.org/p/chromium/issues/detail?id=470601
There was a suggestion to add crossorigin attribute to USE but it seems that specs only define it on IMAGE or SCRIPT:
https://svgwg.org/svg2-draft/linking.html#processingURL-fetch
Please have a look at it. Seems to me that it would be a lot safer to use SVGs like that rather than loading them with network request and inlining in the page which is a current workaround if you want to control the color.