Catch-all proposal based on proxies

Mike Wilson mikewse at hotmail.com
Thu Dec 10 12:51:49 PST 2009


Thanks for the example! Reading up on your "transparent chains" example, it
seems this will also work fine for delegation in "class hierarchies" with
multiple proxy points (User inherits from Person and both classes are
proxied, etc).
 
Just a couple of minor comments on other parts:
 
Why does the handler use "put" for the setter trap instead of "set" like in
previous catchall proposals? (It seems get/set would also provide more
symmetry with syntax in Object.defineProperty.)
 
[really minor nit-pick:] The proposal text sometimes uses the variable "p"
for property names, sometimes for a proxy object. It might aid new readers
if these were renamed "prop" and "proxy", respectively. A similar issue
exists in the handler API listing where the same proxy object is referred to
as both "proxy" and "receiver".
 
Tom Van Cutsem wrote:


Here's the essence of one possible solution:

var attributeBasedFinder = Proxy.create({ 
...

Best regards
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20091210/38db388d/attachment.html>


More information about the es-discuss mailing list