JavaScript Element pointerover Event

Beginner
5 min read
Updated: Nov 2026
3 examples
Event

Definition

In JavaScript, the pointerover event fires when a pointing device moves into an element’s hit-test boundaries (MDN). It is a bubbling PointerEvent — the enter twin of pointerout, and similar to mouseover.

Register a listener with addEventListener. Check readiness and browser support before you rely on this event.

Syntax

Listen for pointerover. Start with this line.

JavaScript
el.addEventListener("pointerover", fn)
CallWhat it does
el.addEventListener("pointerover", fn)Primary signature.

Built into the browser. Listen with el.addEventListener("pointerover", …) — no import required.

Library declarations
JavaScript
el.addEventListener("pointerover", fn)

Parameters

ParameterDescription
Event targetRequired. Element listening for enter
PointerEventRequired. Type, coords, relatedTarget

Return Value

Return ValueDescription
*Fires as an Element event (listener receives the Event object).

JavaScript Examples

Example 1 — Listen for pointerover

MDN-style listener — log when the pointer moves into the element.

JavaScript
const para = document.querySelector("p");

para.addEventListener("pointerover", (event) => {
  console.log("Pointer moved in");
});
Try It Yourself

How It Works

  1. Select the target. Any Element can listen for pointerover.
  2. Add the listener. Use addEventListener or onpointerover.
  3. Enter the element. Mouse, touch, or pen can trigger it.
  4. Expect child noise. Moving into a child can also fire pointerover.

Example 3 — Prefer pointerenter for Whole-Box Enter

Show hover once when entering the element from outside its children.

JavaScript
const box = document.getElementById("box");
const out = document.getElementById("out");

// Usually better than pointerover for whole-component enter (MDN)
box.addEventListener("pointerenter", () => {
  out.textContent = "entered the whole box";
});
Try It Yourself

How It Works

  1. Choose pointerenter. MDN recommends it over pointerover for sensible whole-element enter.
  2. Ignore child crossings. Moving parent → child does not re-fire enter.
  3. No bubbling. Enter fires on the element itself when first entered from outside.
  4. Keep pointerover when you need bubbling or per-child enter signals.

Browser Support

Element pointerover is Baseline Widely available on MDN (since July 2020). Pointer Events work across modern evergreen browsers.

✓ Baseline · Widely available

Element pointerover

PointerEvent when a pointer enters an element — bubbles; watch child crossings.

96% Modern browser support
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Chromium & Legacy
Full support
Internet Explorer IE 6+ · Legacy environments
Full support
Opera All modern versions
Full support
pointerover Excellent

Bottom line: Safe for modern web apps. For whole-component hover enter, prefer pointerenter. Use pointerover when you need bubbling or per-child enter signals.

Frequently Asked Questions

It fires when a pointing device moves into an element’s hit-test boundaries (MDN). It is a bubbling PointerEvent — the enter twin of pointerout.
No. MDN marks Element pointerover as Baseline Widely available (since July 2020). It is not Deprecated, Experimental, or Non-standard.
A PointerEvent. Useful fields include pointerId, pointerType, relatedTarget, clientX, and clientY.
pointerover bubbles and also fires when moving from a parent into a child (or among child boundaries). pointerenter does not bubble and fires only when entering the element from outside its descendants.
For whole-component hover enter without descendant noise, MDN notes pointerenter / pointerleave are usually more sensible than pointerover / pointerout.
When you want bubbling/delegation, or when you care about entering individual children (for example highlighting each list item as the pointer enters it).

Next: pointerrawupdate

Learn the higher-frequency raw pointer update event.

pointerrawupdate tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful