Re:‘This’ in JavaScript
by v413 on Thursday August 03, 2017 @05:36AM
(#14918170)
As an event listener "function(e) {this}" is not the same as "(e) => this". With the regular function "this" points to the element on which the event listener was attached to while with the arrow function "this" points to the context (i.e. "this") of its lexical environment.
[ Parent
| on HN ]
Re:‘This’ in JavaScript
by christophilus on Thursday August 03, 2017 @05:46AM
(#14918207)
That's what the OP was saying.