W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

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

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 1 Nov 2012 02:33:53 +0000 (UTC)
To: Johan Sundström <oyasumi@gmail.com>
Message-ID: <Pine.LNX.4.64.1211010227140.5442@ps20323.dreamhostps.com>
Cc: whatwg@whatwg.org
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 we today need deep knowledge of document.compatMode and/or  
> > > combinations of XMLSerializer and parsers, or deep study of DocumentType  
> > > refdocs to tease out.
> >  
> > Can you elaborate on that?
> 
> Sure – rich as in not "[object DocumentType]", but

Well the toString() isn't what matters, it's what you can get from the 
rest of the attributes on the object. Or are you just saying you wish 
.toString() would expose the concatenated string? That would just be a 
conveniece method. Is it worth the compat risk?


> …on apple.com: <!DOCTYPE html>
> 
> …on roxen.com: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

I don't understand how that is different than document.compatMode, 
really, other than the latter not exposing limited quirks mode. But in 
theory at least, this information is already exposed.


> …on the Firefox default homepage: <!DOCTYPE html [
>   <!ENTITY % htmlDTD
>     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> [...]

This is for XML, right? In HTML the bit in the square brackets would just 
be dropped. It's not clear that it's worth exposing just for XML...

Anyway, this is the DOM Core spec, so I'll let Anne, Aryeh, and Ms2ger 
give you a proper answer. :-)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 1 November 2012 02:34:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT