« Return to Thread: [dom] The "replace" algorithm doesn't deal with the case when child == node.prevSibling

Re: [dom] The "replace" algorithm doesn't deal with the case when child == node.prevSibling

by Boris Zbarsky :: Rate this Message:

| View in Thread

On 6/3/12 5:08 AM, Anne van Kesteren wrote:
> That seems to be what UAs do. My test was:
>
> <!DOCTYPE html>.<script>
> alert(document.documentElement.replaceChild(document.body,
> document.head))</script>

Excellent.  I was pretty sure it was what Gecko already did, but I
hadn't tested others.  It's nice that we have interop.  ;)

> I also fixed this using the same logic.

Looks good, thanks.

> Thanks a lot for catching this!

No problem.  I was rejiggering the Gecko insert/replace code a bit, and
figured I should just write it step by step per spec was all.  :)

-Boris


 « Return to Thread: [dom] The "replace" algorithm doesn't deal with the case when child == node.prevSibling