W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

Re: Iterating over the properties of an ECMAScript object

From: Rick Waldron <waldron.rick@gmail.com>
Date: Fri, 18 Apr 2014 13:22:40 -0400
Message-ID: <CAHfnhfogBoj_waV1u_yp7kaOHST3dmmn7Y0DwnfwFTkKHiHKPQ@mail.gmail.com>
To: Brian Birtles <bbirtles@mozilla.com>
Cc: David Bruant <bruant.d@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Friday, April 18, 2014, Brian Birtles <bbirtles@mozilla.com> wrote:

> Hi Rick,
>
> Thank you very much for your mail.
>
> (2014/04/18 3:08), Rick Waldron wrote:
> > ...
>
>> Agreed, and a step further would be to specify that only valid
>> properties are recognized. Here's a naive hack to illustrate:
>>
>
> I might have misunderstood this point.
>
> The algorithm in 5.15.2[1] begins by creating a list of supported property
> names and only calling [[Get]] on properties in the input object whose
> property name is in the list of supported property names.
>
> It still iterates over the list of properties in the input object (not the
> list of supported property names) for performance reasons: in the common
> case, the input object only has one or two properties whilst the list of
> supported property names is long and is expected to grow over time.
>
> Does that match what you had in mind?
>
>
Indeed, sorry for the noise—I completely missed that.

Rick

> Thanks again,
>
> Brian
>
> [1] http://dev.w3.org/fxtf/web-animations/#processing-a-keyframe-object
> (Unfortunately, named anchors don't currently work very well but it's
> section 5.15.2, Processing a Keyframe object)
>
Received on Friday, 18 April 2014 17:23:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:21 UTC