RE: NamedNodeMap

From the Document Object Model (DOM) Level 2 Core Specification [1]:

"NodeList [p.43] and NamedNodeMap [p.44] objects in the DOM are live; 
that is, changes to the underlying document structure are reflected 
in all relevant NodeList and NamedNodeMap objects. For example, if a 
DOM user gets a NodeList object containing the children of an Element 
[p.52], then subsequently adds more children to that element [p.98] 
(or removes children, or modifies them), those changes are automatically 
reflected in the NodeList, without further action on the user's part. 
Likewise, changes to a Node [p.34] in the tree are reflected in all 
references to that Node in NodeList and NamedNodeMap objects."

Christopher Watson
Sr. Software Engineer
Lightspan, Inc.

[1] http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/


-----Original Message-----
From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen@ml.com]
Sent: Wednesday, July 11, 2001 1:02 PM
To: 'Fred L. Drake, Jr.'; 'www-dom@w3c.org'
Subject: RE: NamedNodeMap

However, I have a new question. Imagine a NodeList is returned by
getElementsByTagName. Then a Node in the DOM tree is modified (e.g.
replaced, removed, etc). Will these changes be reflected in the
NodeList returned by getElementsByTagName? If so this requires active
communication between the DOM and any outstanding NodeLists. Is this true?
Is there a way to make the view passive so that no
active updating of outstanding NodeLists is required?

Received on Wednesday, 11 July 2001 16:19:59 UTC