[gdome]DOMSubtreeModifed behaviour



Hi folks,

in method gdome_xml_n_removeChild three events are fired:

- DOMNodeRemoved (for the node being removed)
- DOMNodeRemovedFromDocument (for the node being removed and all its
  descendants)
- DOMSubtreeModified

But DOMSubtreeModified is fired *AFTER* the following operation:

        gdome_treegc_removeSubtree (oldChild);

If I understand correctly, gdome_treegc_removeSubtree detaches the subtree
rooted at the node being removed from the main tree. Now, if the subtree
is detached, I see no way for the DOMSubtreeModified event to propagate up
to the root of the document. In a prototype that I'm using DOMNodeRemoved,
which is fired before removal, is correctly propagated, but
DOMSubtreeModified is not.

The DOM Events spec says explicitly that DOMSubtreeModified must occur
AFTER any other event. I also think that it's reasonable to assume that in
any case it must be fired BEFORE removal, even though this is not stated
explicitly (at least I didn't find it).

Is this a bug, a correct implementation, or both?

luca






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]