W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2012

Re: Default value of cloneNode() parameter

From: Alexey Proskuryakov <ap@webkit.org>
Date: Mon, 20 Feb 2012 10:05:06 -0800
Cc: Anne van Kesteren <annevk@opera.com>, Ms2ger <ms2ger@gmail.com>, Adam Barth <w3c@adambarth.com>, www-dom@w3.org
Message-id: <740EFD64-1D1A-474C-8406-B010F3EECBC4@webkit.org>
To: Aryeh Gregor <ayg@aryeh.name>

20.02.2012, Χ 9:39, Aryeh Gregor ΞΑΠΙΣΑΜ(Α):

> Are IE or WebKit willing to change their default?  Would Gecko or
> Opera prefer to default to true instead of matching IE/WebKit?
> Implementer feedback requested.

I'm certainly not in favor of changing the behavior that we had for ages, and that is consistent with DOM 3 Core (plus intuitive default argument handling).

It not clear to me why shallow clone is considered so much less useful. Searching for '"cloneNode(false)" filetype:js', I see lots of hits, suggesting that authors did find use for it.

Another argument for defaulting to false is that deep clone is an expensive operation, and should not be attempted without explicit request. Both semantically and performance-wise, cloneNode is quite different from importNode.

- WBR, Alexey Proskuryakov
Received on Monday, 20 February 2012 18:05:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:18 UTC