evancz/elm-html — pull request #11 by zywind (2014-10-14 05:50:27+00:00)
Title: Added the SVG function.

I implemented the SVG function.
The current implementation of the SVG tag does not work because SVG attributes cannot be set directly, they have to be set by calling a setAttribute function.
More information can be found here:
https://github.com/Matt-Esch/virtual-dom/issues/55

The solution is to create a hook for each attribute, and call that attribute hook when the attribute is set.
Mercury implements this function, and I basically copied their implementation:
https://github.com/Raynos/virtual-hyperscript/blob/master/svg.js

There are many things unclear to me though. So please take a look at the code before accepting it.
I think eventually SVG should have its own type because normal HTML nodes cannot be nested within SVG elements, and though current implementation does not check that.