Hello, in one of the JavaScript project tutorials I bumped into this piece of code:
function setProgress() {
const width = this.clientWidth;
console.log(width);
}
progressContainer.addEventListener('click', setProgress)
So the this
keyword in this example is pointing on the event listener. Using this
in event handlers will be always pointing on the event listener element?