HTMLElement: pointerover event
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 |
Examples
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');
};
Specifications
Specification |
---|
Pointer Events # the-pointerover-event |
Browser compatibility
BCD tables only load in the browser
See also
gotpointercapture
lostpointercapture
pointerenter
pointerdown
pointermove
pointerup
pointercancel
pointerout
pointerleave
onpointerover
event handler property- This event on
Document
targets:pointerover
event