Object.getOwnPropertyDescriptors(O) ? // plural

Rick Waldron waldron.rick at gmail.com
Tue Mar 4 10:00:21 PST 2014

On Tue, Mar 4, 2014 at 12:48 PM, Andrea Giammarchi <
andrea.giammarchi at gmail.com> wrote:

> yes, because `Object.getOwnPropertyDescriptor(O, k)` accepts both
> `propertyName` and `Symbol` as second argument. The plural, and to be
> consistent with the shallowCopy example, should return a list of both.
> This is also because all descriptors returned by
> `Object.getOwnPropertySymbols` can be used same way
> `Object.getOwnPropertyNames` ... so, unless `Object.defineProperty(O, k,
> d)` does not accept `k` as `Symbol` (basically breaking this proposal via
> `Object.create`) I don't see why the plural version should not return
> descriptors for both kind of properties.
> My 2 cents

Makes sense to me

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140304/412d87ab/attachment.html>

More information about the es-discuss mailing list