arrow function syntax simplified
Marius Gundersen
gundersen at gmail.com
Fri Mar 30 03:03:01 PDT 2012
>
> Indeed lexical |this| means you can't pass a wrong-this even via .call or
> .apply. Thanks,
Isn't this a bad idea? Take for example the very common jQuery callback
method, which would look like this:
$("img").on("click", e => $(this).hide());
jQuery (and many other frameworks) do a lot of things with |this| behind
the scenes, where it would be very nice to have |this| be set by the
framework.
Or is the consensus that the current way of doing this is not good, and
should be discurraged?
Marius Gundersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120330/cbaaabe2/attachment.html>
More information about the es-discuss
mailing list