4 ms·
I found and I think fixed the issue. https://github.com/arantius/web-color-wheel/issues/1 https://github.com/arantius/web-color-wheel/issues/1
by halostatue 4y ago
I found and I think fixed the issue.
https://github.com/arantius/web-color-wheel/issues/1 https://github.com/arantius/web-color-wheel/issues/1
- panzerboiler 4y agoI don't think the real issue is that one. At least in Safari I get this: t = document.createElement("template") t.innerHTML = `<style id="outside"></style><svg><style id="inside"></style></svg>` t.content.querySelector("#outside").sheet // null t.content.querySelector("#inside").sheet // undefined That means that the .sheet property is present on the style element, but not if it is inside an svg element.
- divbzero 4y agoThis is what I saw too. Safari apparently does not support SVGStyleElement.sheet: https://developer.mozilla.org/en-US/docs/Web/API/SVGStyleElement/sheet https://developer.mozilla.org/en-US/docs/Web/API/SVGStyleEle...
- halostatue 4y agoThe compatibility chart shows Safari supporting SVGStyleElement.sheet since v 3 (v1 iOS). The fix that I suggested does seem to produce a working colour wheel, however.
- deleted 4y ago[deleted]
- divbzero 4y agoInteresting, 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.