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

Re: Implementing NodeList

From: Stephen R. Savitzky <steve@crc.ricoh.com>
Date: 27 Jul 1998 14:53:26 -0700
To: keshlam@us.ibm.com
Cc: www-dom@w3.org
Message-ID: <qc67gjarl5.fsf@gelion.crc.ricoh.com>
keshlam@us.ibm.com writes:

> Unless, of course, my understanding of getElementsByTagName() is incorrect
> and it really means "get immediate children by tag name", which would make
> the whole problem cheap enough not to have to worry about... but the
> description of that method says it searches the subtree.

I don't see how getElementsByTagName could _possibly_ return a ``live''
NodeList unless one of the following two conditions is true:

  1. it only returns immediate children of the given node, AND the indices
     of those children in the NodeList returned are the same as their
     indices in the parent node, i.e. there are some indices that contain
     nulls. 

OR

  2. Elements found by getElementsByTagName are _ripped out_ of their
     original places in tree, and made into the children of a single,
     possibly orphan, Node.

-- 
 Stephen R. Savitzky   Chief Software Scientist, Ricoh Silicon Valley, Inc., 
<steve@rsv.ricoh.com>                            California Research Center
 voice: 650.496.5710   fax: 650.854.8740    URL: http://rsv.ricoh.com/~steve/
  home: <steve@starport.com> URL: http://www.starport.com/people/steve/
Received on Monday, 27 July 1998 17:49:40 GMT

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