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

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