Re: Relation between core DOM and HTML DOM

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 UTC