docs.rodeo

MDN Web Docs mirror

WheelEvent

{{APIRef("UI Events")}} 

The WheelEvent interface represents events that occur due to the user moving a mouse wheel or similar input device.

[!NOTE] This is the standard wheel event interface to use. Old versions of browsers implemented the non-standard and non-cross-browser-compatible MouseWheelEvent and {{DOMxRef("MouseScrollEvent")}}  interfaces. Use this interface and avoid the non-standard ones.

Don’t confuse the wheel event with the {{domxref("Element/scroll_event", "scroll")}}  event:

{{InheritanceDiagram}} 

Constructor

Instance properties

This interface inherits properties from its ancestors, {{DOMxRef("MouseEvent")}} , {{DOMxRef("UIEvent")}} , and {{DOMxRef("Event")}} .

Note: Element: mousewheel event has additional documentation about the deprecated properties wheelDelta, wheelDeltaX, wheelDeltaY.

Instance methods

This interface doesn’t define any specific methods, but inherits methods from its ancestors, {{DOMxRef("MouseEvent")}} , {{DOMxRef("UIEvent")}} , and {{DOMxRef("Event")}} .

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN