This content originally appeared on Go Make Things and was authored by Go Make Things
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.
You can download the source code on GitHub.
This content originally appeared on Go Make Things and was authored by Go Make Things
Go Make Things | Sciencx (2024-10-23T14:30:00+00:00) How to add custom events to Web Components. Retrieved from https://www.scien.cx/2024/10/23/how-to-add-custom-events-to-web-components/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.