Object.getOwnPropertyDescriptors(O) ? // plural

André Bargull andre.bargull at udo.edu
Thu Mar 6 15:14:57 PST 2014


On 3/6/2014 10:24 PM, Brendan Eich wrote:
>> André Bargull <mailto:andre.bargull at udo.edu>
>> March 6, 2014 at 1:21 PM
>>> 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.
>>
>> While it shares the same name with Object.getOwnPropertyNames(), this
>> getOwnPropertyNames trap is supposed to return string and symbol keyed
>> properties, see http://esdiscuss.org/topic/ownpropertykeys .
>
> Should the trap end in Keys not Names?
>
> /be
>

Only if [[OwnPropertyKeys]] gets renamed to something else, because 
having both [[GetOwnPropertyKeys]] and [[OwnPropertyKeys]] seems 
unnecessarily confusing.


More information about the es-discuss mailing list