Object.getOwnPropertyDescriptors(O) ? // plural
andrea.giammarchi at gmail.com
Thu Mar 6 12:49:11 PST 2014
I would rephrase into this:
if you need a getOwnPropertyNames trap, you might need for consistency a
getOwnPropertySymbols independently from getOwnPropertyDescriptors since
these methods are already available.
I also would like to add a couple of links to support the fact
is needed, and has been asked for, since quite a while: this was 11th of
November 2011 ... I didn't know it, and now that I do I wonder why this has
been post-poned for so long and never discussed again.
On Thu, Mar 6, 2014 at 11:24 AM, C. Scott Ananian <ecmascript at cscott.net>wrote:
> If you use a getOwnPropertyNames trap, then you also need a
> getOwnPropertySymbols trap to implement getOwnPropertyDescriptors.
> On Thu, Mar 6, 2014 at 2:16 AM, Tom Van Cutsem <tomvc.be at gmail.com> wrote:
> > 2014-03-05 20:11 GMT+01:00 C. Scott Ananian <ecmascript at cscott.net>:
> >> On Wed, Mar 5, 2014 at 1:39 PM, Tom Van Cutsem <tomvc.be at gmail.com>
> >> > Object.getOwnPropertyDescriptors(proxy) would trigger the
> >> > getOwnPropertyNames trap, followed by calls to the
> >> > getOwnPropertyDescriptor
> >> > trap for each individual property.
> >> [[OwnPropertyKeys]], `ownKeys` trap.
> > Yes, according to the current draft spec. I have a pending discussion
> > Allen that we actually need to reintroduce a [[GetOwnPropertyNames]]
> > internal method / getOwnPropertyNames trap, as the `ownKeys` trap
> doesn't do
> > any invariant checking, which is needed for a reliable Object.isFrozen
> > Regards,
> > Tom
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss