Object.getOwnPropertyDescriptors(O) ? // plural

Tom Van Cutsem tomvc.be at gmail.com
Wed Mar 5 23:16:42 PST 2014


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> wrote:
> > 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 with
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
test.

Regards,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140306/ae118ec0/attachment.html>


More information about the es-discuss mailing list