JavaScript has tons of different events that you can listen to, but you can also create your own custom event for any use case you can think of. Best of all it is incredibly easy to create a custom event in JavaScript. These events are great for implementing things like touch based gestures, and even communicating across your application.
Materials/References:
Event Listener Video: https://youtu.be/XF1_MlZ5l6M
Event Listener Article: https://blog.webdevsimplified.com/2022-01/event-listeners
Custom Events Article: https://blog.webdevsimplified.com/2022-04/js-custom-events
Find Me Here:
My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: https://www.patreon.com/WebDevSimplified
Twitter: https://twitter.com/DevSimplified
Discord: https://discord.gg/7StTjnR
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
00:40 - Basic Custom Events
02:43 - Custom Event Options
05:51 - Passing Data To Custom Events
06:48 - Double Click Example
#CustomJSEvents #WDS #JavaScript