Pointer Events
A single set of events, such as pointerdown and pointermove, that covers mouse, pen and touch input with one code path.
In more detail
Each event says which device produced it in pointerType and adds details like pressure, tilt and contact size. Writing to Pointer Events instead of separate mouse and touch events removes duplicate handlers.
Related terms
- setPointerCapture() — A method that sends all further events from one pointer to a chosen element, even if the pointer moves outside it or off the page.
- touch events — Events such as touchstart and touchmove fired when fingers touch and move on a touchscreen.
- mouse events — The older events such as mousedown and mousemove that report mouse input only.
Taught in
- Pointer Events, Focus Trapping And Keyboard Accessibility — Frontend Architecture & Web Platform