Open gorghoa opened 7 years ago
Thanks for the feedback! (I just saw Slack too)
I'm not sure I can spend my time for this anytime soon. So feel free to do a PR!
Some thoughts I'm thinking now are:
:
.or just adding a namespace: Maybe String to the existing Attribute record.
I think this one is better. Having pure String should work well too.
Hi, I’m using your lib (thanks!) to (in pseudo pipeline) :
My problem lies in the third pipe ”render the svg to the dom via the elm-lang/Svg + elm-lang/virtual-dom”: To create namespaced attributes correctly in dom elements correctly, I have to use
VirtualDom.attributeNS
.Say a tag like:
<use xlink:href="#great" … />
. thexlink:href
is a namespaced attribute, the namespace is declared in the svg tag like<svg xmlns:xlink="http://www.w3.org/1999/xlink">
.Once parsed with elm-xml-parser, to render this node in view, I would love to do it like this:
I know this would be a BC break, since it would leads to changing the type of Attribute from
type alias Attribute = { name : String, value : String }
to something like maybe:or just adding a
namespace: Maybe String
to the existing Attribute record.If you are interested in this feature, I could give it a try. Just let me know which solution you prefer.
Refs