In this example, I didn't explicitly close a couple of <input> elements:
https://codesandbox.io/s/vigilant-goodall-hqh8u
That is, <input> and other HTML void elements seem to require a trailing slash, e.g. <input /> - but there is no error message when void elements aren't explicitly terminated, and you get some strange results in the DOM.
Is the parser XHTML by design?
Handling HTML 5 void elements shouldn't require much work, and shouldn't add much to the footprint, I think - I wrote a toy HTML 5 parser myself in 0.5 KB, and the magic is less than 100 bytes.
In this example, I didn't explicitly close a couple of
<input>elements:https://codesandbox.io/s/vigilant-goodall-hqh8u
That is,
<input>and other HTML void elements seem to require a trailing slash, e.g.<input />- but there is no error message when void elements aren't explicitly terminated, and you get some strange results in the DOM.Is the parser XHTML by design?
Handling HTML 5 void elements shouldn't require much work, and shouldn't add much to the footprint, I think - I wrote a toy HTML 5 parser myself in 0.5 KB, and the magic is less than 100 bytes.