W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Element.create(): a proposal for more convenient element creation

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 2 Aug 2011 11:05:22 -0700
Message-ID: <CAAWBYDA-3QTny5cGGrvoL_0_XKC5tcFW9HhLAw+fq70aa_bgYA@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Maciej Stachowiak <mjs@apple.com>, Alex Russell <slightlyoff@google.com>, WebApps WG <public-webapps@w3.org>
On Tue, Aug 2, 2011 at 12:36 AM, Jonas Sicking <jonas@sicking.cc> wrote:
> I'm not sure if it's better to include the children as a var-args
> list, or as an array. Certainly when typing things normally var-args
> saves you the "[" and "]", but when coding, if you've built the child
> list dynamically and have an array, you have to make awkward .apply
> calls.

Read again - the idea is to auto-expand arrays.

(I don't have much of a preference between "just use an array" and
"use varargs, but expand arrays".  I agree that using only varargs
without expansion would be bad.)

~TJ
Received on Tuesday, 2 August 2011 18:06:09 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:46 GMT