4 ms·
It is not lost. "application/xhtml+xml" accepted by all browsers. Browser DOM is XHTML in disguise document.contentType //"text/html" document.body
by sergeykish 6y ago
It is not lost. "application/xhtml+xml" accepted by all browsers. Browser DOM is XHTML in disguise
document.contentType
//"text/html"
document.body.namespaceURI
//"http://www.w3.org/1999/xhtml"
HTML is just a serialization optimized for human authoring, it has its faults
script = document.createElement('script')
script.textContent = '</script>'
script.outerHTML
//"<script></script></script>"
It may be humanity does not have an adequate and widely used way of plain text authoring of structured text. DOM diff and patch may be lacking as well.