2 ms·
At a glance (mobile sorry), it looks like .on is jQuery? If so, you don’t need bind, you just need `function`: thing.on("some_event", function() { // `th
by eyelidlessness 4y ago
At a glance (mobile sorry), it looks like .on is jQuery? If so, you don’t need bind, you just need `function`:
thing.on("some_event", function() {
// `this` is `thing`
})
Arrow functions close over `this` from their outer scope.