- From: Alex Russell <slightlyoff@google.com>
- Date: Mon, 31 Oct 2011 16:25:01 -0700
- To: Cameron McCormack <cam@mcc.id.au>
- Cc: Rick Waldron <waldron.rick@gmail.com>, Jonas Sicking <jonas@sicking.cc>, Webapps WG <public-webapps@w3.org>, Yehuda Katz <wycats@gmail.com>, John Resig <jeresig@gmail.com>, Paul Irish <paulirish@google.com>, Lachlan Hunt <lachlan.hunt@lachy.id.au>
On Mon, Oct 31, 2011 at 2:03 PM, Cameron McCormack <cam@mcc.id.au> wrote: > On 31/10/11 1:56 PM, Alex Russell wrote: >> >> Live NodeList instances don't need to be considered here. They're the >> result of an API which generates them, and that API can be described >> in terms of Proxies. No need to complicate NodeList or imply that we >> need a different type. >> >> Making NodeList instances real array unifies them all. We can get that >> done too. > > Don't live and static NodeLists use the same prototype? Yes, I envision they would. The restrictions on live lists are probably going to be created by a proxy that wraps them and manages their semantics. > If they are > separate, I don't see any problem with making them "real arrays", but I am > not sure what the implications of that are. Array.isArray == true, I guess? For JS, it just means having a working ".length" property (in all the ways that Arrays allow it to be used). Arrays are identical to other objects in all other respects. > Do we have that ability within the bounds of ECMAScript yet? Note that we > can already make NodeList.prototype === Array.prototype if we want, using > appropriate Web IDL annotations. We'll need ES 6 proxies to get the working .length thing today. Not ideal.
Received on Monday, 31 October 2011 23:26:12 UTC