This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://dom.spec.whatwg.org/#interface-nodeiterator [[ Before a node is removed from the iterator collection, these steps must be run: ]] Not entirely sure how to hook this into the mutation algorithms.
Basically, the current setup is wrong. The node is removed hook needs to be passed removedNode, oldParent, and oldPreviousSibling as arguments. Those can then be used to do various things.
To be clear, the steps are in fact run after the node is removed. http://mxr.mozilla.org/mozilla-central/source/content/base/src/NodeIterator.cpp#71 has details from Gecko.
https://github.com/whatwg/dom/commit/4937f1a5e39c0914ad2f0a3a35558cf1678e8b89