In JavaScript, the DOMMouseScroll event fires asynchronously when a mouse wheel (or similar device) is operated and the accumulated scroll amount is over about one line or one page since the last event (MDN). It was implemented only by Firefox.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Syntax
Listen for DOMMouseScroll. Start with this line.
JavaScript
addEventListener("DOMMouseScroll", fn)
Call
What it does
addEventListener("DOMMouseScroll", fn)
Primary signature.
Built into the browser. Listen with el.addEventListener("DOMMouseScroll", …) — no import required.
Library declarations
JavaScript
addEventListener("DOMMouseScroll", fn)
Parameters
Parameter
Description
Handler prop
Optional. onDOMMouseScroll
Return Value
Return Value
Description
*
Fires as an Element event (listener receives the Event object).
Keep the listener passive unless you must call preventDefault.
Replace every DOMMouseScroll string with "wheel" when migrating.
Compatibility
Browser Support
ElementDOMMouseScroll is Deprecated and Non-standard on MDN (Firefox/Gecko history). Do not add it to new code — migrate to wheel.
✓ Deprecated · Non-standard
DOMMouseScroll
Legacy Firefox wheel/line-scroll event — study only, prefer wheel.
—Deprecated
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
DOMMouseScrollFirefox legacy
Bottom line: Use wheel + deltaY for portable apps. To cancel scrolling on modern Firefox, preventDefault on wheel.
Frequently Asked Questions
It is a legacy Firefox (Gecko) event fired asynchronously when a mouse wheel or similar device is operated and the accumulated scroll amount is over about one line or one page since the last event (MDN). Prefer the standard wheel event.
MDN marks it Deprecated and Non-standard. It is not Experimental. Avoid it in new projects — use wheel instead.
Historically Firefox only. Other engines do not implement this Firefox-specific event. Always use wheel for portable apps.
MDN lists the event type as WheelEvent (inherits from MouseEvent, UIEvent, and Event). Legacy Gecko also describes it via MouseScrollEvent.
No — not reliably. MDN: on Gecko 17+, call preventDefault() on wheel events, because small native wheel moves may not produce DOMMouseScroll.
Use the standardized wheel event. It works across browsers and exposes deltaX, deltaY, deltaZ, and deltaMode.