Comment

Comment by amadeuspagel

> Event handler properties have disadvantages compared to addEventListener(). One of the most significant is that you can't add more than one listener for a single event. The following pattern doesn't work, because any subsequent attempts to set the property value will overwrite earlier ones:

That's not really a disadvantage, rather it makes it easy to change the event handler.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton