New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support svg #7
Comments
svg elements should live in a |
I considered that, but I may want to have a function that say, returns a svg circle, so I can't use magic to make it know that function is being called as an argument to a Another possibility would be for simplest: var h = require('hyperscript')
var s = require('hypersvg')
h('svg', s('circle')) |
We landed svg support in Maybe take inspiration from that implementation. |
It would be really helpful if hyperscript and virtual-hyperscript would have the same API. Would be very useful to be able to swap between them whenever. I just ran into that issue while doing svg elements. |
+1 |
Seems like virtual-hyperscript takes a |
@staltz I think I’ve never used virtual-dom for SVG yet. Can you show us a minimal example what it looks like? Does |
Is |
It's just a shortcut to virtual-dom's svg helper. Cycle.js is a framework on top of virtual-dom. |
Thanks! So it looks like @dominictarr’s idea |
(BTW @staltz I have stumbled across Cycle.js before, but never used it for anything. Looks very interesting! I like the way you solved a couple of problems. But having been bitten by Angular and later Mithril I now prefer to compose libraries instead of sticking to a framework.) |
Would be cool if this supported svg.
you can't create svg with html elements...
and you can't detect an element is an svg element purely on the name of that tag,
be cause
<a>
means different thing in svg land, also, svg seems to use attributes, not properties...So, probably write a new module
hypersvg
...Refactor hyperscript, so that most of the code can be the same...
The text was updated successfully, but these errors were encountered: