torus icon indicating copy to clipboard operation
torus copied to clipboard

Full inline SVG support

Open thesephist opened this issue 6 years ago • 0 comments

I don't know yet how well Torus works with rendering inline SVG inside HTML documents, or how much extra work / code in min-gzipped bundle it'll cost to ship a good experience for working with SVGs, but this is something Preact/React supports well, so I'd like Torus to support it.

Context: https://stackoverflow.com/questions/3492322/javascript-createelement-and-svg Documentation for document.createElementNS() which is necessary for creating SVG namespaced elements: https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS

One way to ship this without bloating the primary torus-dom package, since SVG is not a super common use case, would be to ship it as a separate SVGComponent extends Component with a custom JDOM preprocess step.

thesephist avatar Mar 31 '19 09:03 thesephist