- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 11 Nov 2013 15:44:53 -0500
- To: Domenic Denicola <domenic@domenicdenicola.com>
- CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
On 11/11/13 3:18 PM, Domenic Denicola wrote: > For example, `node.clone({ shallow: true })` or `node.clone({ deep: true })` seems much better than `node.clone(true)` or `node.clone(false)`. Those have the same exact issue. If you define something like: interface Node { Node cloneNode(optional CloneOptions arg); }; dictionary CloneOptions { boolean deep = true; }; then you get { deep: foo } producing a deep clone but { deep: !!foo } producing a shallow clone if foo is undefined. So we would in fact want this to be: dictionary CloneOptions { boolean shallow = false; }; if we want to default to deep clones. -Boris
Received on Monday, 11 November 2013 20:45:23 UTC