  Re: Mutation events replacement  From: Aryeh Gregor
<Simetrical+w3c@gmail.com> Date: Thu, 21 Jul 2011 16:15:22 -0400
Message-ID: <CAKA+Ax=UMsm_H5yQA+ThYUgJyEHhtPARtP5oppkFdrv1hEPsQQ
@mail.gmail.com> To: Ryosuke Niwa <rniwa@webkit.org>, Boris
Zbarsky <bzbarsky@mit.edu> On Wed, Jul 20, 2011 at 3:11 PM,
Ryosuke Niwa <rniwa@webkit.org> wrote: > But internally, a node
movement is a removal then an insertion.  There's > always
possibility that a node gets removed then inserted again after >
mutation observers are invoked.  Also, what happens if a
function removed a > bunch of nodes and then inserted back one
of them?  I'm suggesting that we change
insertNode()/appendChild()/etc. so that they're *not* internally
a removal then an insertion: they're internally atomic.  If you
call foo.removeChild(bar); foo.appendChild(bar) then that would
be a remove/insert no matter what.  But if you call
foo.appendChild(bar) and bar has a parent and bar is not the
last child of foo, that would be a move.  Yes, this causes
problems