Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot assign to read only property 'className' of object '#<SVGSVGElement>' #476

Closed
sporto opened this issue Oct 23, 2018 · 1 comment
Closed

Comments

@sporto
Copy link

sporto commented Oct 23, 2018

Originally opened here rtfeldman/elm-css-helpers#2

This still happens. Example:

module Main exposing (main)

import Browser
import Html.Styled exposing (Html, div)
import Html.Styled.Attributes exposing (class)
import Svg.Styled exposing (svg, rect)
import Svg.Styled.Attributes as A


icon attrs =
    svg ([] ++ attrs) [
        rect
            [ A.fill "EEE"
            , A.width "32"
            , A.height "32"
            , A.x "0"
            , A.y "0"
            ]
            []
    ]



main =
    div [] [ icon [ class "foo" ]
    
    ]
        |> Html.Styled.toUnstyled

https://ellie-app.com/3H4jf9P8ffwa1

@sporto
Copy link
Author

sporto commented Oct 23, 2018

This is an issue in elm-svg elm/svg#3

@sporto sporto closed this as completed Oct 23, 2018
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

No branches or pull requests

1 participant