How do HTML event handlers work?

November 12, 2024

HTML event handlers are those onxxx attributes and properties many of us are used to, but do you know how they actually work? If you’re writing custom elements and would like them to have such event handlers, what would you have to do? And what would you possibly be unable to implement? What differences would there be from native event handlers?

Source: How do HTML event handlers work?

One way to deeply understand a technology is to implement it. Here Thomas Broyer looks at how HTML event handlers (like onclick) work.