coderef

Wheel eventsLimited availability

The wheel event fires when the user moves a mouse wheel or similar spatially rotating input device.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–30Not supported
31+Supportedsince Nov 12, 2013
Current: 155
Edge
12+Supportedsince Jul 29, 2015
Current: 154
Firefox
1–16Not supported
17+Supportedsince Nov 20, 2012
Current: 157
Safari
1–6Not supported
7+Supportedsince Oct 22, 2013
Current: 27
MobileChrome Android
18–30Not supported
31+Supportedsince Nov 14, 2013
Current: 155
Firefox Android
4–16Not supported
17+Supportedsince Nov 20, 2012
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: wheel event.

Feature detection

JS · check before using
if ("WheelEvent" in globalThis) {
  // WheelEvent is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (8). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Element.wheel_event31121773117✕
WheelEvent11217318171
WheelEvent.WheelEvent261217726177
WheelEvent.deltaMode261217726177
WheelEvent.deltaX311217831178
WheelEvent.deltaY311217831178
WheelEvent.deltaZ311217831178
WheelEvent.pinch_to_zoom_support317955153155✕