Document: pointerenter event

The pointerenter event fires when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown event from a device that does not support hover (see pointerdown).

Bubbles No
Cancelable No
Interface PointerEvent
Event handler property onpointerenter

Examples

Using addEventListener():

document.addEventListener('pointerenter', (event) => {
  console.log('Pointer entered element');
});

Using the onpointerenter event handler property:

document.onpointerenter = (event) => {
  console.log('Pointer entered element');
};

Specifications

Specification Status
Pointer Events – Level 2 Recommendation
Pointer Events Obsolete

Browser compatibility

BCD tables only load in the browser

See also