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

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

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 21 Aug 2007 22:30:29 +0200
To: "Simon Pieters" <zcorpan@gmail.com>
Cc: "Web API public" <public-webapi@w3.org>
Message-ID: <uaimc39jnrcnfk0lrmviqo89kv58e0alpl@hive.bjoern.hoehrmann.de>

* Simon Pieters wrote:
>I propose that some members of the HTMLDocument and HTMLElement interfaces  
>that are also useful for non-HTML documents and non-HTML elements are  
>moved either to Document and Element or to DocumentWithUsefulStuff and  
>ElementWithUsefulStuff interfaces (possibly with better names). If we go  
>with the latter option, DOM Core implementations would be able to either  
>not implement those interfaces or implement them on Document and Element  
>objects, probably using binding-specific methods.

I would then recommend to go with the DocumentWithUsefulStuff option and
keeping DOM Core's Document interface (and Element interface) useful for
all DOM implementations.

>HTML5 says that all Document objects must implement HTMLDocument and other  
>supported interfaces. I presume it says so in order to dodge the question  
>of when to implement which interface, in addition to making e.g.  
>document.cookie usable in SVG documents.

Yes, but also documents with elements from multiple namespaces, like an
SVG document inside a XHTML document, are a concern here. The individual
ExampleDocument interfaces are difficult to access in that scenario, and
you have to adapt scripts if you change the structure of the document. A
different approach like the one you propose would have to provide an
answer to these problems.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Tuesday, 21 August 2007 20:30:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:09:57 UTC