Almost everyone defaults to using mouse events such as mousedown and mouseup, but this is not ideal. Mouse events do not include things like touch and pen interactions and duplicating all your mouse events into touch events is not ideal either. This is where pointer events come in. Pointer events work for all types of input (mouse, touch, pen, etc.) and best of all they include a few additional features and methods that make doing complex interactions incredibly easy.
Materials/References:
Touch Events Video: https://youtu.be/TaPdgj8mucI
Event Listener Crash Course Video: https://youtu.be/XF1_MlZ5l6M
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
01:16 - Pointer Event Basics
09:10 - Pointer Capturing
#PointerEvents #WDS #JavaScript