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

Re: [selectors-api] Return an Array instead of a static NodeList

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 30 Aug 2011 16:43:07 +1200
Message-ID: <4E5C6A5B.1030105@mcc.id.au>
To: Aryeh Gregor <ayg@aryeh.name>
CC: Jonas Sicking <jonas@sicking.cc>, Julien Richard-Foy <julien@richard-foy.fr>, public-webapps@w3.org
On 30/08/11 4:40 AM, Aryeh Gregor wrote:
> Oh, right.  I misunderstood you.  Yes, obviously we wouldn't expose
> things like .push or .pop on NodeList, since they wouldn't make sense.
>   But we should expose things like .forEach, etc.  Any reason not to?

I should point out that on platform array objects (i.e., the JS objects 
you get from IDL T[] types, and not JS Array objects) can be designated 
as read only but they always have Array.prototype in their prototype 
chain.  push/pop/etc. will just fail or do nothing, depending on whether 
the caller is in strict mode.
Received on Tuesday, 30 August 2011 04:43:48 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:34 UTC