1 article has "dom" tag
- 1
Don't use
window.event
Read moreSuppose you have the following HTML and JavaScript:
<button id="btn">Click me</button>
let myBtn = document.querySelector("#btn"); myBtn.addEventListener("click", () => { console.log(event); });
What do you think clicking on the button will happen?