W3C home > Mailing lists > Public > public-html@w3.org > August 2007

Re: Implementing HTMLDocument on all Documents (detailed review of the DOM)

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 21 Aug 2007 21:20:16 +0000 (UTC)
To: Simon Pieters <simonp@opera.com>
Cc: public-html <public-html@w3.org>
Message-ID: <Pine.LNX.4.64.0708212118330.28693@dhalsim.dreamhost.com>

On Tue, 21 Aug 2007, Simon Pieters wrote:
> 
> The spec says about Documents:
> 
>   All Document objects (in user agents implementing this specification)
>   must also implement the HTMLDocument interface, available using
>   binding-specific methods. (This is the case whether or not the document
>   in question is an HTML document or indeed whether it contains any HTML
>   elements at all.) Document objects must also implement the
>   document-level interface of any other namespaces found in the document
>   that the UA supports. For example, if an HTML implementation also
>   supports SVG, then the Document object must implement HTMLDocument and
>   SVGDocument.
> 
> We're not happy with implementing the HTMLDocument interface on all 
> Document objects. It will affect all other types of documents and the 
> naming of their members in the future, and any additions to HTMLDocument 
> in the future becomes risky because it might break non-HTML documents.
> 
> We'd rather have the members of HTMLDocument that are useful for all 
> types of documents to be moved to the Document interface.

Would you be ok with moving _everything_ to Document?


> However, if we don't implement all supported interfaces on all Documents, the
> question instead becomes when do you implement a specific interface?

That's one question (with no answer, because as you point out, you can 
take one document and turn it into another). But there are also more 
importantly authoring questions. When you have mixed content documents, 
how do you access the SVG-specific stuff when the document is thought by 
the UA to be an HTML document? How do you access HTML-specific stuff when 
the document is thought to be an SVG document?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 21 August 2007 21:21:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:04 GMT