Why is the 'this' context of an arrow function the 'window' object and not the element I'm listening for events on?
const chkBox = document.createElement('input');
chkBox.type = 'checkbox';
document.body.appendChild(chkBox);
// Works as expected:
chkBox.addEventListener('change', function () {
console.log("long fn: ", this.checked, this); // this = checkbox element
});
// 'this' is the window object, so there's no 'checked' property:
chkBox.addEventListener('change', e => console.log("short fn: ", this.checked, this)); // this = window