The pointerover
event is fired when a pointing device is moved into an element's hit test boundaries.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Interface | PointerEvent |
Event handler property | onpointerover |
The pointerover
event is fired when a pointing device is moved into an element's hit test boundaries.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Interface | PointerEvent |
Event handler property | onpointerover |
Using addEventListener()
:
const para = document.querySelector('p'); para.addEventListener('pointerover', (event) => { console.log('Pointer moved in'); });
Using the onpointerover
event handler property:
const para = document.querySelector('p'); para.onpointerover = (event) => { console.log('Pointer moved in'); };
Specification |
---|
Pointer Events # the-pointerover-event |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
pointerover_event |
55 |
12
12-79
|
59 |
11
10
|
42 |
13 |
55 |
55 |
79 |
42 |
13 |
6.0 |
gotpointercapture
lostpointercapture
pointerenter
pointerdown
pointermove
pointerup
pointercancel
pointerout
pointerleave
onpointerover
event handler propertyDocument
targets: pointerover
event
© 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/HTMLElement/pointerover_event