W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: [DOM4] Question about collections versus maps

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 10 Apr 2012 13:23:16 -0700
Message-ID: <CAAWBYDDmw9KwPX9Mi04DkwtBCifxKwPaZ2oW4cajEd3X+srypw@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-webapps@w3.org
On Tue, Apr 10, 2012 at 1:16 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 4/10/12 4:13 PM, Tab Atkins Jr. wrote:
>> According to current WebIDL spec, an object with a named property
>> getter exposes the list of names as own properties, so you can get
>> them with for-in enumeration.
> 1)  for-in enumeration enumerates prototype properties.

Yes, but prototype properties aren't own properties, so you can tell them apart.

> 2)  for-in enumeration enumerates expandos which might have nothing to
>    do with the set of named properties.

It's not possible to set an expando on a map object like this.  (The
setter operation will either do something useful, or will reject the
attempt to set.)

Received on Tuesday, 10 April 2012 20:24:05 UTC

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