GlobalEventHandlers.onpointerover

The onpointerover property of the GlobalEventHandlers mixin is an event handler that processes pointerover events.

Syntax

targetElement.onpointerover = overHandler;

var overHandler = targetElement.onpointerover;

Value

overHandler
The pointerover event handler for element targetElement.

Example

This example shows two ways to use onpointerover to set an element's pointerover event handler.

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

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

Specifications

Specification
Pointer Events
# dom-globaleventhandlers-onpointerover

Browser compatibility

BCD tables only load in the browser

See also