[whatwg] Proposal for window.DocumentType.prototype.toString
bzbarsky at MIT.EDU
Mon Oct 29 18:17:45 PDT 2012
On 10/29/12 8:58 PM, Johan Sundström wrote:
> Serializing a complete HTML document DOM to a string is surprisingly
I thought there were plans to put innerHTML on Document. Did that go
> this might do it:
> document.doctype + document.documentElement.outerHTML
This seems lossy in many cases (most obviously: when the HTML uses
conditional comments, though there are also various XHTML-specific issues).
> The most useful implementation would IMO be a native one
> that reproducing the doctype, as it was formatted in the source
That might be worth doing independent of the serialization issue.
More information about the whatwg