W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2015

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

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 11 Jan 2015 03:58:45 +0100
To: Glen Huang <curvedmark@gmail.com>
Message-ID: <g1p3bad0mgfnr0e7qru8u8c6pscmpi98j2@hive.bjoern.hoehrmann.de>
Cc: whatwg@whatwg.org
* Glen Huang wrote:
>When someone says A replace B, I get the impression that B is no longer 
>in effect and A is the new one. So when I do `node1.replace(node2)`, I 
>can’t help but feel node2 is replaced with node1, which is the opposite 
>of what the spec specifies.

To illustrate this, imagine some team sports game where the coach jells
"Jane, replace John!", in other words, `Jane.replace(John)`. It is clear
that Jane is instructed to take the position of John.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
D-10243 Berlin · PGP Pub. KeyID: 0xA4357E78 · http://www.bjoernsworld.de
 Available for hire in Berlin (early 2015)  · http://www.websitedev.de/ 
Received on Monday, 12 January 2015 07:41:37 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:32 UTC