developit / htm

Hyperscript Tagged Markup: JSX alternative using standard tagged templates, with compiler support.
Apache License 2.0
8.67k stars 170 forks source link

Text "div" is included in the DOM #162

Closed maxkerp closed 4 years ago

maxkerp commented 4 years ago

Hi there,

I'm using preact and htm to create a realtime web based representation of the dice game schocken.

Somehow when rendering img tags it renders or includes text in the DOM which says "div" and I can't seem to figure out what the reason for this is.. :grimacing:

Does anybody here have an idea what I'm doing wrong?

BTW thanks for this awesome tech! It rocks :metal:

Screenshot from 2020-04-11 15 45 23

dy commented 4 years ago

Can you provide the code example? It's possible you don't close some tags properly, htm does not fully support html syntax.

maxkerp commented 4 years ago

Hey thank you so much for the quick response :+1:

This was exactly my problem. I forgot to close the img tags.. :see_no_evil: After closing them, everything works as expected.

Thanks!