hyperhype/hyperscript

Void tags like img don't output proper outerHTML

Zacqary opened this issue · 3 comments

Creating an img tag with Hyperscript outputs the outerHTML:

<img src="img://src.url"></img>

It wouldn't crash a browser but it's not desirable either. Any way to fix this?

I guess you need a list of tags that don't need the closing tag, would merge a pr to fix that.

From http://www.w3.org/TR/html-markup/syntax.html:

The following is a complete list of the void elements in HTML:
area, base, br, col, command, embed, hr, img, input, keygen, link, meta,
param, source, track, wbr

I might be able to fix this, but if anyone gets to it first, there's the
list.
On May 16, 2015 7:45 PM, "Dominic Tarr" notifications@github.com wrote:

I guess you need a list of tags that don't need the closing tag, would
merge a pr to fix that.


Reply to this email directly or view it on GitHub
#34 (comment)
.

This is actually an issue in the HTML-Element module. I opened a pull request on that repo to fix. Once it's merged, updating to the latest version of HTML-Element should fix it.