pointerId
PointerId is a numeric identifier used by the Pointer Events API to distinguish individual input pointers, such as mouse, pen, and touch contacts, within a single document. It is exposed as the pointerId property of PointerEvent objects and uniquely identifies the pointer that caused a sequence of events.
The value is stable for the duration of a pointer’s contact with the surface. All events belonging
PointerId is scoped to the current document and session. It is not guaranteed to be persistent across
Practical uses include tracking multiple concurrent pointers to implement multi-touch gestures, dragging operations, or gesture recognition.
Compatibility notes: pointerId is part of the Pointer Events API, supported in modern browsers. Some older environments