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

Re: Implementing NodeList

From: Don Park <donpark@quake.net>
Date: Mon, 27 Jul 1998 14:52:45 -0700
Message-ID: <003101bdb9a8$e7246bd0$2ee044c6@arcot-main>
To: <www-dom@w3.org>

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

-----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
>> and it really means "get immediate children by tag name", which would
>> 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.
>  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,
><steve@rsv.ricoh.com>                            California Research Center
> voice: 650.496.5710   fax: 650.854.8740    URL:
>  home: <steve@starport.com> URL: http://www.starport.com/people/steve/
Received on Monday, 27 July 1998 18:01:15 UTC

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