write HTML tags when creating an element
sptaule opened this issue · comments
sptaule commented
Hello,
i would like to place HTML tags when creating an element but the html tags where rendered as text
const hello = el("div", "<span>Hello there</span>");
Am I missing something ? thanks !
Juha Lindstedt commented
Yes, text is rendered as text. You can use innerHTML param for example:
el('div', { innerHTML: '<span>Hello there</span>' });