News for hackers. Stuff that matters.
Re:Events by dannye on Monday August 11, 2025 @10:39AM (#44864639)
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>

There are no comments on this comment yet.