How to add custom events to Web Components
If you’ve been following along with my YouTube series on building a web app using only vanilla Web Components, I just released the fourth and final video in the series…
In this one, I add a custom emit() helper function, talking about custom event naming conventions, and show you how you can cancel Web Component actions using the event.preventDefault() method in your event listener.