Re: [whatwg] Confusion about node1.replace(node2)

Just realize that reversing the algorithm won’t work for node.replace(nodes), where nodes contains multiple nodes.

So yeah, replaceWith looks pretty good.

> On Jan 12, 2015, at 8:07 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
> 
> On Mon, Jan 12, 2015 at 12:03 PM, Glen Huang <curvedmark@gmail.com> wrote:
>> Or, the current algorithm of replace could be reversed, which should eliminate such confusion.
> 
> I think as James said that would leave the confusion. And given the
> precedent in libraries, replaceWith() seems good.
> 
> 
> -- 
> https://annevankesteren.nl/

Received on Monday, 12 January 2015 13:09:11 UTC