files/en-us/web/api/element/mozmousepixelscroll_event/index.md
{{APIRef("UI Events")}}{{deprecated_header}}{{Non-standard_header}}
The Firefox-only, non-standard, and obsolete MozMousePixelScroll event is fired at an {{domxref("Element")}} asynchronously when a mouse wheel or similar device is operated. It's represented by the {{ domxref("MouseScrollEvent") }} interface.
[!NOTE] Do not use this non-standard and obsolete event. Instead, you should always use the standard {{domxref("Element.wheel_event", "wheel")}} event.
Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}}, or set an event handler property.
addEventListener("MozMousePixelScroll", (event) => { })
onMozMousePixelScroll = (event) => { }
A {{domxref("WheelEvent")}}. Inherits from {{domxref("MouseEvent")}}, {{domxref("UIEvent")}} and {{domxref("Event")}}.
{{InheritanceDiagram("WheelEvent")}}
The event's {{domxref("UIEvent/detail", "detail")}} property indicates the scroll distance in terms of lines, with negative values indicating the scrolling movement is either toward the bottom or toward the right, and positive values indicating scrolling to the top or left.
If the platform's native mouse wheel events indicate the scroll distance in terms of lines or pages, the value of detail is computed using that value and the line height or page width/height of the nearest ancestor scrollable element that contains the target element.
[!NOTE] On macOS, the scroll distance (and therefore the value of
detail) is computed based on the accelerated scroll distance.
The value of detail is never 0 if the events are legitimate.
{{Compat}}
DOMMouseScrollmousewheelwheel