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

Re: Implementing NodeList

From: <keshlam@us.ibm.com>
Date: Mon, 27 Jul 1998 17:02:40 -0400
To: www-dom@w3.org
Message-ID: <8525664E.00727C50.00@us.ibm.com>
     There is nothing in the spec about updating of the index positions and
     such. It is entirely up to the user to stay out of trouble.  Since the
     current DOM spec does not support concurrent access to a DOM, this is
     easily done.

Uhm... Don, that's the question I started with: "Does the fact that
NodeList is explicitly described as 'live' imply that if I take a NodeList,
insert and/or delete nodes, take another NodeList and compare the two, they
will have the same nodes at the same indices?"

I was told "yes".

If that's correct, the update (or something that achieves the same
appearance) is required... which is what I'm trying to find a clean
implementation for, specifically in the case where the NodeList came from
getElementsByTagName() and hence may reach deep into the tree.

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.
Received on Monday, 27 July 1998 17:02:30 UTC

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