Closed strass closed 4 years ago
Lemme take a look. The example we have uses SVG, but lemme see if I can repro it. Unless you already have an open repo with repro code.
I just figured it out. options allow text but not svgs lol. works fine, my bad. one thing I've found is that attributes cant be camelcased which isnt true elsewhere
What do you mean by “options allow text not svgs?”
Attributes not being camel cases is a html dom limitation that is imposed by browser. Snabbdom is simply making setAttribute calls.
html option elements dont allow arbitrary html inside, and were rendering unicode geometric characters but not svgs when I tried to switch over. my bad
I'm pretty sure I've noticed the props and style help transform camel case into kebab, but maybe I'm misremembering
Yeah snabbdom jsx lite doesn’t do any special string transformations. String kungfu is expensive. That’s how we’re able to do a million vnodes in 100ms at ~10ns / jsx call.
The style module sets on elem.style which is camel cased. Same as props. They are camelCased as well.
I'm having trouble with SVGs. This creates the nodes and the polygon even has styles on it, but the attributes don't show up (nor do they when I use props):