corespring/wiggi-wiz — pull request #69 by benburton (2014-06-04 19:10:41+00:00)
Title: Do not remove nodes when it's a replacement

I'm not really totally clear on whether or not this is the best behavior.

Essentially, what happens is that the mutation observer receives a mutation that indicates a node has been replaced -- it has been removed and then added to the document. In the context of wiggi-wiz, this means that, an image, for example is removed and then restored... which is triggering a http DELETE of the resource from the server in some cases.

Assuring that the full delete method is not called when the mutations represent a replacement (when they constitute both the addition and removal of a node) fixes this problem.