jorgebucaran/hyperapp

A way to insert raw Html

flowHater opened this issue · 1 comments

Is there a way to insert html. In my case it's svg.
I go through the documentation references, h doest seem to allow inserting raw HTML.
I know, for exemple, React allow that kind of stuff, with dangerouslySetInnerHTML.

My use case is to be able to insert Icon as svg, with a lightweight lib like feathericons. With can output me a svg.

Ok, sorry.
I found this,
h("div", {innerHTML: "<h1>Hello</h1>"})
Reading from the source code, that all props are passed into the dom.
The first attempt I misspelled innerHtml. Have to use innerHTML
https://developer.mozilla.org/fr/docs/Web/API/Element/innerHTML

Thanks