On 12 August 2011 13:53, Tom Van Cutsem <[email protected]> wrote: > I think I found a compelling and easy-to-understand > rule for determining whether or not a trap needs access to proxy/receiver: > if the trap deals with inherited properties, it needs access to |proxy|. > > Using that rule, the following traps require access to |proxy|: > get, set, getPropertyDescriptor, getPropertyNames, has, enumerate > (incidentally, all of these traps are or can be made derived) > > All other traps deal only with "own" properties, and do not need |proxy|: > getOwnPropertyDescriptor, getOwnPropertyNames, defineProperty, delete, fix, > hasOwn, keys
Although that rule seems fairly simple, I still find a half/half situation unnecessarily confusing and error-prone. I would strongly vote for making the API consistent. That is, either equip all methods with a proxy argument (preferably as first), or none. /Andreas _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

