“This” within es6 class method [duplicate]
Why is the “this” inside of of the Clickers’ click method referring to the dom node rather than … itself? Because the specification for .addEventListener() is to set the this pointer to the DOM element that caught the event. That’s how it is designed to work. When passing a method as a callback where you … Read more