GO-V.ORG
As seen in

Element: DOMMouseScroll event

The DOM DOMMouseScroll event is fired asynchronously when mouse wheel or similar device is operated and the accumulated scroll amount is over 1 line or 1 page since last event. It's represented by the MouseScrollEvent interface. This event was only implemented by Firefox. You should instead use the standard wheel event.

The DOM `DOMMouseScroll` event is fired asynchronously when mouse wheel or similar device is operated and the accumulated scroll amount is over 1 line or 1 page since last event. It's represented by the MouseScrollEvent interface. This event was only implemented by Firefox. You should instead use the standard wheel event.

If you want to prevent the default action of mouse wheel events, it's not enough to handle only this event on Gecko because If scroll amount by a native mouse wheel event is less than 1 line (or less than 1 page when the system setting is by page scroll), other mouse wheel events may be fired without this event.

On Gecko 17 (Firefox 17) or later, you need to call `preventDefault()` of `wheel` events which must be fired for every native event.

Use the standardized wheel event if available.

## Syntax

Use the event name in addEventListener():

```js-nolint
addEventListener("DOMMouseScroll", (event) => { })
```

Alternatively, assign to the [event handler property](/docs/Web/API/Document_Object_Model/Events#using_onevent_properties) of the interface:

```js-nolint
onDOMMouseScroll = (event) => { }
```

## Event type

A WheelEvent. Inherits from MouseEvent, UIEvent and Event.

WheelEvent

## Browser compatibility

## See also

- MouseScrollEvent
- Gecko's legacy pixel scroll event: `MozMousePixelScroll`
- Non-Gecko browsers' legacy mouse wheel event: `mousewheel`
- Standardized wheel event: `wheel`

source: MDN Web Docs mirror · page

Cite this

"Element: DOMMouseScroll event". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/Element/DOMMouseScroll_event

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·