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

Reply via email to