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

Re: Relation between core DOM and HTML DOM

From: Don Park <donpark@quake.net>
Date: Wed, 14 Oct 1998 10:47:32 -0700
Message-ID: <006301bdf79a$bb9f1070$2ee044c6@arcot-main>
To: "'DOM list'" <www-dom@w3.org>
>  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


In all the interface-based designs I came across, I have never seen a single
design which relied on the 'absence' of an interface.  Exactly what
advantages are there to this 'guaranteed' lack of interface?

>  HTMLDocument someHTMLDoc = new BasicHTMLDocument();
>  Element xmlLikeElement = someHTMLDoc.createElement("FOO");
>  Element htmlElement = someHTMLDoc.createElement("TABLE");
>
>  if(xmlLikeElement instanceof HTMLElement)
>    // always true

>
>  if(htmlElement instanceof HTMLElement)
>    // always true
>
>  if(htmlElement instanceof HTMLTableElement)
>    // always true


While I do agree with this, I am concerned about how embeded XML should be
handled.  Should they always implement HTMLElement?  Are there any
conflicts?

Don Park
Docuverse
Received on Wednesday, 14 October 1998 13:48:10 GMT

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