W3C home > Mailing lists > Public > www-dom@w3.org > January to March 1999

Re: document.createElement returned instance

From: Christophe Ney <christophe@lutris.com>
Date: Wed, 13 Jan 1999 17:51:18 -0800
Message-ID: <001801be3f60$6120c360$6bd66fcf@cney2.lutris.com>
To: <www-dom@w3.org>
Cc: "Mark Diekhans" <markd@Grizzly.COM>

I guess I just ran through a docuverse bug, that is:

        HTMLDocument doc=new BasicHTMLDocument(new DOM());
        Element elem = doc.createElement("HEAD");
        System.out.println("elem instanceof HTMLHeadElement="+(elem
instanceof HTMLHeadElement));

gives me an output of
    elem instanceof HTMLHeadElement=false

Christophe Ney
Lutris Technologies

-----Original Message-----
From: Terje Norderhaug <terje@in-progress.com>
To: www-dom@w3.org <www-dom@w3.org>
Date: Wednesday, January 13, 1999 3:55 PM
Subject: Re: document.createElement returned instance

>At 1:38 PM 1/13/99, Christophe Ney wrote:
>>Here is a basic question for which I don't find any answer in the specs:
>>When calling document.createElement("P") should I expect to get
>>an instance of Element, HTMLElement or HTMLParagraphElement ?
>As DOM providdes interfaces NOT class definitions, you should expect to get
>back an object that can be accessed using the HTMLParagraphElement
>interface. What it is an instance of is not specified. The actual class of
>the returned object is implementation dependent and doesn't have to match
>with the names in DOM.
>-- Terje <Terje@in-progress.com> | Media Design in*Progress
>   Software for Mac Web Professionals at <http://www.in-progress.com>
>   * C a s c a d e... a comprehensive Cascading Style Sheets editor
>   * WebSlides generates presentations displayed with any browser
>   * XPublish - for efficient website publishing with XML
>   * Make your Web Site a Social Place with Interaction!
Received on Wednesday, 13 January 1999 20:47:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:05 UTC