Proxies traps receiver
On Sep 17, 2011, at 12:03 PM, Xavier MONTILLET wrote:
How come the get and set traps get a receiver argument when the others don't?
Please catch up on relevant threads in this list if you can. In any case, see
strawman:strawman under "proxy extensions", in particular
Le 17/09/2011 19:39, Brendan Eich a écrit :
On Sep 17, 2011, at 12:03 PM, Xavier MONTILLET wrote:
How come the get and set traps get a receiver argument when the others don't? Please catch up on relevant threads in this list if you can. In any case, see
strawman:strawman under "proxy extensions", in particular
On Sep 17, 2011, at 2:07 PM, David Bruant wrote:
Le 17/09/2011 19:39, Brendan Eich a écrit :
On Sep 17, 2011, at 12:03 PM, Xavier MONTILLET wrote:
How come the get and set traps get a receiver argument when the others don't? Please catch up on relevant threads in this list if you can. In any case, see
strawman:strawman under "proxy extensions", in particular
Thanks. Also, these are all on track for ES6, I should have added. We just need to get Tom and Andreas R. and everyone else required to ratify at the same meeting, which looks like it will be the November meeting.
On this webpage: harmony:proxies They show this:
{ has: function(name) -> boolean // name in proxy hasOwn: function(name) -> boolean // ({}).hasOwnProperty.call(proxy, name) get: function(receiver, name) -> any // receiver.name set: function(receiver, name, val) -> boolean // receiver.name = val enumerate: function() -> [string] // for (name
in proxy) (return array of enumerable own and inherited properties) keys: function() -> [string] //
Object.keys(proxy) (return array of enumerable own properties only) }
How come the get and set traps get a receiver argument when the others don't?
I mean the only aim of having a receiver argument is to be able to use the same "traps"object for several proxies and in fact, you can for get and set traps. But it won't work on has, hasOwn and so on...
What's the reason for that?
Thank you in advance.