Yeah, this is from practical experience with Mozilla. And really, the
whole point of a snapshot is to have a nodelist that isnt connected to
the document tree from whence it came. That way if you wanted to take 5
minutes going through all the nodes your guaranteed that they will
exist in the snapshot the way that they existed in the document tree at
the time you ran your xpath. With an iterator, during that 5 minute
time-frame, some other process just might have mutated the document
tree; so of course your iterator has to then be invalidated.
Quote:
Obviously if you want to remove nodes then they are disconnected once
you remove them. But if you remove one node from the list the snapshot
gives you then you can still work with the other nodes in the snapshot
to remove them.
>
Martin Honnen http://JavaScript.FAQTs.com/ |
What I am saying is that once you SNAPSHOT - poof - the thing you have
is already a separate entity from the original document tree. That
means that if you discombobulate every node in the snapshot, the
original document tree remains intact. Thats the point of a snapshot,
but it also means you cant use one to modify a DOM, which is what I was
trying to do.