GlobalEventHandlers.onpointermove

The onpointermove property of the GlobalEventHandlers mixin is an event handler that processes pointermove events.

Syntax

targetElement.onpointermove = moveHandler;

var moveHandler = targetElement.onpointermove;

Value

moveHandler

The pointermove event handler for element targetElement.

Example

This example shows two ways to use onpointermove to set an element's pointermove event handler.

<html>
<script>
function moveHandler(ev) {
  // Process the pointermove event
}
function init() {
  let el=document.getElementById('target1');
  el.onpointermove = moveHandler;
}
</script>

<body onload="init();">
  <div id="target1"> Touch me ... </div>
  <div id="target2" onpointermove="moveHandler(event)"> Touch me ... </div>
</body>
</html>

Specifications

Specification
Pointer Events
# dom-globaleventhandlers-onpointermove

Browser compatibility

BCD tables only load in the browser

See also