Skip to content

Add classList to Svg.Attributes#24

Open
globaljake wants to merge 1 commit into
elm:masterfrom
globaljake:master
Open

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

Conversation

@globaljake

@globaljake globaljake commented Apr 10, 2018

Copy link
Copy Markdown

@ondrejsevcik

Copy link
Copy Markdown

Would love to see this merged.

The issue lives now here #17

@wclr

wclr commented Oct 27, 2021

Copy link
Copy Markdown

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

@ondrejsevcik

Copy link
Copy Markdown

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

@wclr

wclr commented Oct 27, 2021

Copy link
Copy Markdown

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
Copy Markdown

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

@wclr

wclr commented Oct 27, 2021

Copy link
Copy Markdown

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

DHager commented Dec 9, 2021

Copy link
Copy Markdown

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