Interesting, the missing SVGStyleElement.sheet must be a Safari bug not captured by MDN’s compatibility chart? Your workaround of finding the sheet in document.styleSheets is clever and seems to work.
For some reason, the style element inside the svg does not have a .sheet property. A workaround is to create the style element in js and append it to the svg, or move it outside the svg and let the styles cascade. A strange bug...
Comments (169) 64 threads
Show all comments
Showing thread 7 of 64
Fine in Chrome. Thanks for this colour wheel, very handy reference.
It has an extra comma at the end. Safari throws when passed to: c.setAttribute('points', points)
https://github.com/arantius/web-color-wheel/issues/1
https://developer.mozilla.org/en-US/docs/Web/API/SVGStyleEle...
The fix that I suggested does seem to produce a working colour wheel, however.
https://imgur.com/a/Tsx9pEZ
Webkit implementing web standards: https://media.tenor.com/images/7d9d11dacf3d5c4043c1da7cf5f11...
I use Chrome for its developer tools exclusively.
Continue this thread — 1 reply
Continue this thread — 4 replies