What’s the best way to add SVG elements to the dom in Clojurescript ? The Twitterbuzz example uses Google Closure lib’s Graphics objects, but say I didn’t care about IE compatibility, is there a way I could add elements the way html is (dom/build [:svg [:g [:text "something like this ?"]]])
I tried Closure’s graphics lib but I don’t get to use a lot of handy SVG features. I tried Apogee, but that serializes the SVG code and I would prefer direct DOM manipulation.
What’s the best way to add SVG elements to the dom in Clojurescript ?
Share
dom/build constructs DOM elements without the namespace. You need to either enhance dom/build or write one for SVG. I use the following code to create SVG elements.