RE: Semi-OT: Where To Go...

> -----Original Message-----
> From:	Watson, Christopher [SMTP:CWatson@lightspan.com]
> 
> Where should I trundle off to in order to ask of the DOM implementations
> community questions pertaining to how the "live" aspects of NodeLists are
> dealt with? I realize that the DOM FAQ[1] has a section titled "NodeList
> issues", and I have read that. It gives a top-level explanation of how
> 
	It has been suggested that a common technique is to enable all NodeList
	operations with the capacity to construct an updated list at any moment and
	then have a "dirty flag" on the tree (or perhaps on each node) that would
	indicate reconstruction is necessary.

	I and at least one other person I know of punted on this. I would be very happy
	to hear more about this as well because I don't fully understand the above
	description myself.

	The problem is that it assumes the action used to generate the original list can
	be parameterised. For example, if the getElementsByTagName is used to create
	the list, you could save this information and the name of the tag used to perform
	the query. If the list is a simple list of children however, these parameters are not
	required. Perhaps this is not what was intended at all however but instead that
	the NodeList simply be patched as needed. When the dirty flag indicates that the
	tree (or branch of) has been modified, each member will be examined and
	compared to the main tree.

	All of this applies to NamedNodeMap as well which is even more troubling
	because the Map is not immutable.

	Mike

Received on Tuesday, 31 July 2001 21:09:22 UTC