Skip to content

Add classList to Svg.Attributes#24

Open
globaljake wants to merge 1 commit intoelm:masterfrom
globaljake:master
Open

Add classList to Svg.Attributes#24
globaljake wants to merge 1 commit intoelm:masterfrom
globaljake:master

Conversation

@globaljake
Copy link

@globaljake globaljake commented Apr 10, 2018

@ondrejsevcik
Copy link

Would love to see this merged.

The issue lives now here #17

@wclr
Copy link

wclr commented Oct 27, 2021

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

@ondrejsevcik
Copy link

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

@wclr
Copy link

wclr commented Oct 27, 2021

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

They both are aliases for VirtualDom.Attribute.

@ondrejsevcik
Copy link

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

@wclr
Copy link

wclr commented Oct 27, 2021

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.

@DHager
Copy link

DHager commented Dec 9, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants