Comment Comment by dannye What the MDN documenation doesn't make clear, is the relationship between Inline Event Handlers and Event Handler Properties<div id="DIV" onclick="console.log(1)">CLICK!</div><script> DIV.onclick = (evt) => console.log(2) DIV.addEventListener("click",()=>console.log(3)) </script> parent dannye 1 year ago
<div id="DIV" onclick="console.log(1)">CLICK!</div>
<script>
</script>