W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: oldNode.replaceWith(...collection) edge case

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 20 Jan 2015 11:39:37 +0100
Message-ID: <CADnb78hT0FLfr_bpLRY3N6Qgoqbda9CQ=qt1CxcFJ5vHnm763Q@mail.gmail.com>
To: Glen Huang <curvedmark@gmail.com>
Cc: WebApps WG <public-webapps@w3.org>
On Sun, Jan 18, 2015 at 4:40 AM, Glen Huang <curvedmark@gmail.com> wrote:
> To generalize the use case, when you have a bunch of nodes, some of which need to be inserted before a node, and some of which after it, you are likely to want `replaceWith` could accept the context node as an argument.

This sound somewhat reasonable but I haven't been able to reproduce
this in existing libraries. E.g. in Jquery

  $("div").replaceWith([$("div"), "<b>test</b>"])

ends up as just <b>test</b>...

Received on Tuesday, 20 January 2015 10:40:01 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:25 UTC