News for hackers. Stuff that matters.
Re:VanJS: A 0.9KB JavaScript UI framework by jraph on Wednesday December 20, 2023 @08:12PM (#38715923)
XHTML5 is a thing.
Re:VanJS: A 0.9KB JavaScript UI framework by recursive on Wednesday December 20, 2023 @08:32PM (#38716037)
This is news to me. From what I can find (which is not much), it seems like XHTML5 is a further constraint on HTML5. So legal XHTML5 is legal HTML5.

https://en.wikipedia.org/wiki/HTML5#XHTML_5_(XML-serialized_...

If that's true, that means <div /> is not valid XHTML5 because 1) trailing slashes don't close tags in html and 2) div elements require a closing tag.

And if that's true, then it's still different from JSX. But this XHTML5 thing might be surpassing my comprehension.

Re:VanJS: A 0.9KB JavaScript UI framework by jraph on Thursday December 21, 2023 @04:13AM (#38718471)
> So legal XHTML5 is legal HTML5.

Almost. You would need to make sure to write polyglot markup [1].

> And if that's true, then it's still different from JSX

Absolutely.

[1] https://www.w3.org/TR/html-polyglot/