Element: pointerenter

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
Target objects Document, Element
Interface PointerEvent
Event handler onpointerenter

Examples

Using addEventListener():

const para = document.querySelector('p');

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

Using the onpointerenter event handler property:

const para = document.querySelector('p');

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

Browser compatibility

No compatibility data found. Please contribute data for "api.Element.pointerenter_event" (depth: 1) to the MDN compatibility data repository.

See also

Document Tags and Contributors

Last updated by: wbamberg,