html2hyperscript
html2hyperscript copied to clipboard
Does not parse style attribute
Does not parse style attribute, stays as string. Which seem to be not valid.
https://github.com/Matt-Esch/virtual-dom/issues/204
Thanks for reporting this, I can see that this breaks virtual-dom expectations. The solution would be to do a rudimentary CSS parse, convert property names to camelCase and output an object, I guess. This also makes me wonder about the class attribute (should it be converted to className?).
Well they maybe leaved in as is,
so style="background-color: red" -> `"style": {"background-color": "red"}
anyway your module is doing some kind of JSON (all the properties name have quotes), but it would be nice to have an option that it would create not json but js object like `style: {backgroundColor: "red"}
as well it would be useful to have ability to have instead h("div.someclass", ...) -> div("someclass", ...)
btw it seem that better solution will be to place all the attributes to attributes this will solve other issues and this too.