W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2011

[whatwg] relationship between Document and HTMLDocument

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 9 Aug 2011 20:58:36 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1108092056420.22648@ps20323.dreamhostps.com>
On Tue, 9 Aug 2011, David Flanagan wrote:
> >
> > Possibly. I think an alternative is to make the HTML spec just add all 
> > the members to Document, and then define window.HTMLDocument as 
> > returning the Document interface object. This would make instanceof 
> > and "monkeypatching" work as today.
> So you'd declare HTMLDocument with the [NoInterfaceObject] extended 
> attribute and then add attribute HTMLDocument to the Window interface?  

That would have the same effect, but what I had in mind was actually to 
change the HTML spec to not define an HTMLDocument interface, instead 
renaming it to Document and adding the 'partial' WebIDL modifier.

We'd also have to do this for SVGDocument and other document objects; 
before doing this it would be good to see if it's something that is 
generally agreeable to everyone.

> That changes HTMLDocument from non-enumerable to enumerable, but that 
> seems unlikely to be a compatibility issue.  That works for me, I think.

Could you elaborate on this? I'm not sure what you mean exactly.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 9 August 2011 13:58:36 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:35 UTC