Document: pointermove event

The pointermove event is fired when a pointer changes coordinates, and the pointer has not been canceled by a browser touch-action.

Bubbles Yes
Cancelable Yes
Interface PointerEvent
Event handler property onpointermove


Using addEventListener():

document.addEventListener('pointermove', (event) => {
  console.log('Pointer moved');

Using the onpointermove event handler property:

document.onpointermove = (event) => {
  console.log('Pointer moved');


Pointer Events
# the-pointermove-event

Browser compatibility

BCD tables only load in the browser

See also