W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: Relation between core DOM and HTML DOM

From: John Cowan <cowan@locke.ccil.org>
Date: Wed, 14 Oct 1998 13:56:43 -0400
Message-ID: <3624E5DB.EDEEC4D7@locke.ccil.org>
To: DOM List <www-dom@w3.org>
Miles Sabin wrote:

> Just to confirm the impressions I get from this thread:
> am I right to assume the the intended behaviour is as
> follows:
> 
>   Document someXMLDoc = new BasicDocument();
>   Element xmlElement = someXMLDoc.createElement("FOO");
>   Element htmlLikeElement = someXMLDoc.createElement("TABLE");
> 
>   if(xmlElement instanceof HTMLElement)
>     // always false
> 
>   if(htmlLikeElement instanceof HTMLElement)
>     // always false

I don't accept this part.  There can be no guarantees about what
interfaces (other than the expected interface) are, or are not, implemented by the objects returned by createXXX.

In particular, it might be true in a given implementation that
*every* class that implements Element also implements HTMLElement.

-- 
John Cowan	http://www.ccil.org/~cowan		cowan@ccil.org
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)
Received on Wednesday, 14 October 1998 13:56:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT