Kartikaya Gupta wrote:
On Thu, 17 Jul 2008 17:51:42 -0700, Jonas Sicking <[EMAIL PROTECTED]> wrote:
* Add a DOMDescendantRemovedFromDocument event which is fired on a node
   when the node is in a document, but any of nodes the descendants is
   removed from the document. The event is fired after the removal takes
   place.
   The relatedNode property contains the removed descendant. The
   relatedIndex property contains the index the child had
   immediately before the removal. (Should relatedIndex be -1 when
   the node wasn't removed from its parent, but rather an ancestor was?)

From this description it seems bit ambiguous as to exactly which node is the 
target of the event, since there could be multiple nodes that satisfy the 
conditions (a) being attached to the document and (b) ancestor of the removed 
node. I assume you mean the node that satisfies the conditions that is deepest 
in the tree? And yes, I think relatedIndex should be -1 if an ancestor was the 
one that was removed, so that it's easier to distinguish between the roots of 
the removed subtrees and the non-roots.

Good point. Yes, I meant the one deepest in the tree. Another way to put it is that the target is always the parent old of the root of the subtree that was removed.



/ Jonas

Reply via email to