W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2001

Re: Node.ownerDocument property: always defined?

From: David Flanagan <david@oreilly.com>
Date: Mon, 16 Jul 2001 10:34:51 -0700
Message-Id: <200107161734.KAA00894@oxymoron.oreilly.com>
To: keshlam@us.ibm.com
CC: PBWiz@mail.pbwizard.com, www-dom@w3.org

> All other nodes have their ownerDocument set before Document.create...()
> returns.

That's what I assumed, but I don't think the spec ever actually says
this, and I'd suggest that it ought to be clarified.  All I can find
about it is:

> The Document object associated with this node. This is also the Document
> object used to create new nodes. When this node is a Document or a
> DocumentType which is not used with any Document yet, this is null.
     
Perhaps that second sentence is trying to say this:

   When one of the create methods of a Document object is used to create
   a new node, the ownerDocument property of the newly created node is
   set to the creating Document object.

However, I read it as saying:

   If you've got a node A, and want to create a new node B as part of 
   the same document, then use the ownerDocument property of node A to
   find the Document object to use.   

I suggest a clarification (although I do not suggest using my  language
above!)

     David Flanagan
Received on Monday, 16 July 2001 14:30:15 GMT

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