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
Pointer Events
# the-pointerenter-event

Browser compatibility

BCD tables only load in the browser

See also