ES6 Proxy Function Call Trap

Kevin Smith zenparsing at
Thu Jun 11 13:48:51 UTC 2015

> So why not do that for ES6 proxies as well by adding an `invoke` trap.

Tom's response a couple of messages back summed it up fairly well.

To paraphrase, introducing "invoke" is a reasonable thing to propose
(evidenced by the fact that it was part of the spec draft at one point).
However, "invoke" in JS not a fundamental operation.  It's always been a
"get" followed by a "call".  And since Proxies are all about allowing the
user to define arbitrary behavior for the fundamental object model
operations, it makes more sense to not have an "invoke" trap.

Could a userland library make writing these kinds of proxies more ergonomic?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list