let doc =
{
div
{
class:"block",
height:"200px",
span:
{
innerText:"text",
style:
{
color:"red";
}
}
}
}
<div class="block" height="200px">
<span style="color:red">text</span>
</div>
const doc = h(
'div.block',
{
style: {
height: '200px',
},
},
h('span', 'text', {
style: {
color: 'red',
},
})
);
var html = elem("ul", {"id":"mylist"}, [
elem("li", null, "Item 1"),
elem("li", null, "Item 2"),
elem("li", null, "Item 3"),
]);
<ul id="mylist">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>