[whatwg] Proposal for window.DocumentType.prototype.toString

Tim Streater tim at clothears.org.uk
Tue Oct 30 09:15:00 PDT 2012

On 30 Oct 2012 at 10:20, Stewart Brodie <stewart.brodie at antplc.com> wrote: 

> Johan Sundström <oyasumi at gmail.com> wrote:

>> Serializing a complete HTML document DOM to a string is surprisingly
>> hard in javascript.
> Does XMLSerializer().serializeToString(document) not meet your requirement?

I was wondering that too. I use it to get the content of an iframe into a string, so I can send that off to a database. Seems to work without problems (Safari Mac 6.0.1). But I too had to ask how to do that; it wasn't particularly obvious that that was what I should have been using (to me at any rate).

Cheers  --  Tim

More information about the whatwg mailing list