Questions about Proxy.[[OwnPropertyKeys]] and the List type

# saam barati (9 years ago)

I’m currently implementing section 9.5.11 of the spec ( tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys ). Sections 17 and 19 perform the Remove operation on the List type. How is the Remove operation defined? Is it defined to just delete the first instance of something in the List or all instances? Is this defined somewhere? (If so, I couldn’t find it. Sorry if it’s there.) If not, maybe it’s worth defining?

Also, it appears the the algorithm defined in 9.5.11 allows for duplicate entries to be returned by this trap under certain circumstances (dependent on how List::Remove is defined). Is this intended? I think this would be the only place where [[OwnPropertyKeys]] has duplicate entries. Maybe we should guarantee the items are unique?

Thanks, Saam