17.0.4 fixed a bug that was causing DOM exceptions by changing the way we were updating styles to use VirtualDom.attribute "class" ... instead of VirtualDom.property "className" ....
This was due to svg elements not liking the property "className" method which is a known phenomenon in the html spec.
fixes #564
Context
17.0.4 fixed a bug that was causing DOM exceptions by changing the way we were updating styles to use
VirtualDom.attribute "class" ...
instead ofVirtualDom.property "className" ...
.This was due to svg elements not liking the
property "className"
method which is a known phenomenon in the html spec.Some random stack overflow post that is probably true: https://stackoverflow.com/questions/43750395/how-to-add-a-class-in-a-svg-element-circle-using-javascript
However, whilst the pesky exception was fixed there were some unintended side effects you can read about in this issue #564.
Work completed
extractUnstyledAttribute
function to behave as it used to for html elements.extractUnstyledAttributeNS
function to set styles for svg nodes using theattribute
method.The above changes focus on only fixing what was breaking, rather than changing the implementation for all elements.
Styled examples showing svg and html elements with their respective class properties.