Have you tried experimenting with babel to achieve this? Here is a starting point for a transform that makes all arrow functions behave this way: https://gist.github.com/spion/adc5b0110f9466efc0a2 (note: may need more work)
Unfortunately, as far as I know whole new type of function would probably have to be introduced for this. Some security capabilities of JS are based on closure captures being inaccessible outside their scope.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

