Re: Implementing NodeList

Fellas,

This confusion stems from the movement of words between different versions
of the spec.  If you read the latest spec more carefully, you will see that
the word "live" is used only in the description of the attribute
"childNodes".  This means that the NodeList itself is not always live and
that the NodeList returned by getElementsByTagName is not live.  Only the
NodeList returned by getChildNodes is "live".

Does this help?

Don Park
CTO/Docuverse

-----Original Message-----
From: Stephen R. Savitzky <steve@crc.ricoh.com>
To: keshlam@us.ibm.com <keshlam@us.ibm.com>
Cc: www-dom@w3.org <www-dom@w3.org>
Date: Monday, July 27, 1998 2:50 PM
Subject: Re: Implementing NodeList


>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 18:01:15 UTC