Le 28/07/2011 06:21, Brendan Eich a écrit :
== Handler access to proxies ==

Another alternative: the proxy could be "passed" via a data property on the 
handler. But the only use for the proxy reference is as a key in a weakmap, and if the 
handler references it, the handler could just as well be the key -- or the handler could 
simply hold the value associated by the weakmap.
Also, if the FixedProperty or NonExtensibleProxy proposals (the later has only been discussed on es-discuss and has nothing on the wiki) are accepted, then proxies will carry some information that the handler may want to introspect (Object.isExtensible, Object.getOwnPropertyDescriptor().configurable). These informations are meant to be kept out of the proxy author control, so they cannot be put as a handler property either. Having the proxy as an argument of all traps would be a best way to access these informations in my opinion. Of course, this is dependent on the FixedProperties (NonConfigurableProperties) and NonExtensibleProxy

David
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to