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

2012-11-01 Thread Johan Sundström
On Wed, Oct 31, 2012 at 7:33 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 31 Oct 2012, Johan Sundström wrote: On Wednesday, October 31, 2012 at 15:02 , Ian Hickson wrote: On Tue, 30 Oct 2012, Johan Sundström wrote: That said, I would still much enjoy a future where

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

2012-10-31 Thread Johan Sundström
On Tue, Oct 30, 2012 at 3:20 AM, Stewart Brodie stewart.bro...@antplc.com wrote: Hi everybody! Serializing a complete HTML document DOM to a string is surprisingly hard in javascript. Does XMLSerializer().serializeToString(document) not meet your requirement? Ah – good thinking. (new

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

2012-10-31 Thread Ian Hickson
On Tue, 30 Oct 2012, Johan Sundström wrote: That said, I would still much enjoy a future where javascript:alert(document.doctype) would tell you something rich about the page that we today need deep knowledge of document.compatMode and/or combinations of XMLSerializer and parsers, or deep

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

2012-10-31 Thread Johan Sundström
On Wednesday, October 31, 2012 at 15:02 , Ian Hickson wrote: On Tue, 30 Oct 2012, Johan Sundström wrote: That said, I would still much enjoy a future where javascript:alert(document.doctype) would tell you something rich about the page that we today need deep knowledge of

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

2012-10-31 Thread Ian Hickson
On Wed, 31 Oct 2012, Johan Sundström wrote: On Wednesday, October 31, 2012 at 15:02 , Ian Hickson wrote: On Tue, 30 Oct 2012, Johan Sundström wrote: That said, I would still much enjoy a future where javascript:alert(document.doctype) would tell you something rich about the page that

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

2012-10-30 Thread Stewart Brodie
Johan Sundström oyas...@gmail.com wrote: Hi everybody! Serializing a complete HTML document DOM to a string is surprisingly hard in javascript. Does XMLSerializer().serializeToString(document) not meet your requirement? -- Stewart Brodie Team Leader - ANT Galio Browser ANT Software

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

2012-10-30 Thread Tim Streater
On 30 Oct 2012 at 10:20, Stewart Brodie stewart.bro...@antplc.com wrote: Johan Sundström oyas...@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

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

2012-10-29 Thread Johan Sundström
Hi everybody! Serializing a complete HTML document DOM to a string is surprisingly hard in javascript. As a fairly seasoned javascript hacker I figured this might do it: document.doctype + document.documentElement.outerHTML It doesn't. No browser has a useful window.DocumentType.prototype

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

2012-10-29 Thread Boris Zbarsky
On 10/29/12 8:58 PM, Johan Sundström wrote: Serializing a complete HTML document DOM to a string is surprisingly hard in javascript. I thought there were plans to put innerHTML on Document. Did that go nowhere? As a fairly seasoned javascript hacker I figured this might do it:

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

2012-10-29 Thread Ojan Vafai
On Mon, Oct 29, 2012 at 6:17 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 10/29/12 8:58 PM, Johan Sundström wrote: Serializing a complete HTML document DOM to a string is surprisingly hard in javascript. I thought there were plans to put innerHTML on Document. Did that go nowhere?

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

2012-10-29 Thread Ian Hickson
On Mon, 29 Oct 2012, Johan Sundstr�m wrote: Serializing a complete HTML document DOM to a string is surprisingly hard in javascript. As a fairly seasoned javascript hacker I figured this might do it: document.doctype + document.documentElement.outerHTML It doesn't. No browser has a