svg icon indicating copy to clipboard operation
svg copied to clipboard

Add classList to Svg.Attributes

Open globaljake opened this issue 6 years ago • 7 comments

In reference to https://github.com/elm-lang/svg/issues/17

globaljake avatar Apr 10 '18 15:04 globaljake

Would love to see this merged.

The issue lives now here https://github.com/elm/svg/issues/17

ondrejsevcik avatar Aug 14 '19 12:08 ondrejsevcik

What is the problem of using Html.Attributes.classList for this? Svg and Html are actually the same type VirtualDom.Node.

wclr avatar Oct 27 '21 11:10 wclr

It's the Elm type system - Svg.Attribute is not the same as Html.Attribute

ondrejsevcik avatar Oct 27 '21 12:10 ondrejsevcik

It's the Elm type system - Svg.Attribute is not the same as Html.Attribute

They both are aliases for VirtualDom.Attribute.

wclr avatar Oct 27 '21 12:10 wclr

If I remember correctly, there was an issue during run-time then.

ondrejsevcik avatar Oct 27 '21 14:10 ondrejsevcik

If I remember correctly, there was an issue during run-time then.

Ah, I believe you are right here, in Html it sets propery className, which won't work on svg element, should use setAttribute.

wclr avatar Oct 27 '21 15:10 wclr

Arriving here via web-search, I agree that a similar classList capability would be nice to have.

DHager avatar Dec 09 '21 01:12 DHager