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

Re: Implementing Document.createElement, etc.

From: <keshlam@us.ibm.com>
Date: Thu, 8 Oct 1998 11:27:47 -0400
To: www-dom@w3.org
Message-ID: <85256697.005458E2.00@us.ibm.com>
Yes, Alan, you've read it correctly.

>My current (mis)understanding is that when an element is created using
>Document.createElement that it is not yet part of the document hierarchy.

True. It has an ownerDocument (the Document whose factory you used to
produce it), but has no parent or siblings; you've created an "orphan"
node. It has no parent until you insert or append it to another node.

>these newly created nodes can node <sic> be found by any of the methods
>to traverse the document tree

I presume you meant "can not be found" -- which is entirely correct.

>a Document object that is used to create an Attribute object with
>Document.createAttribute() would not return that Attribute

Also correct. It isn't an attribute of the Document -- in fact, Documents
can't have Attributes -- and it isn't an attribute of any Element until you
assign it to one.

Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.
Received on Thursday, 8 October 1998 11:27:51 UTC

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