Is there an accessible way to utilize svg elements in purescript halogen? I'm trying to draw a dynamic, clickable, graph within an <svg>
, but the only reference I can find to svg
is in Halogen.Themes.Bootstrap, which seems to be more concerned with css themeing.
2
votes
Trying to work this out myself. They're not included, but it should be possible to create any XML element - poke around in src/HTML/Elements.purs for how it's done for the included ones.
– kai
1 Answers
1
votes
Halogen doesn't provide a module for SVG elements, but you can construct your own elements in the appropriate namespace. If you're using the currently tagged release version (v0.12.0), then these you can use the Element
constructor from Halogen.HTML.Core
: https://pursuit.purescript.org/packages/purescript-halogen/0.12.0/docs/Halogen.HTML.Core#t:HTML