W3cubDocs

/Web APIs

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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
pointerenter_event
55
12
12-79
59
11
10
42
13
55
55
79
42
13
6.0

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Document/pointerenter_event