>
> 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?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to