W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2012

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 03 Jun 2012 16:11:15 -0400
Message-ID: <4FCBC4E3.5070901@mit.edu>
To: Anne van Kesteren <annevk@annevk.nl>
CC: www-dom@w3.org
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
Received on Sunday, 3 June 2012 20:11:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:09 GMT