The DOM WheelEvent represents events that occur due to the user moving a mouse wheel or similar input device.
This is really different event object from MouseWheelEvent.
Attributes
| Attribute | Type | Description |
deltaX |
double |
Horizontal scroll amount. Read only. |
|
double |
Vertical scroll amount. Read only. |
deltaZ |
double |
Scroll amount for the z-axis. Read only. |
deltaMode |
unsigned long |
Unit of delta values. See Delta modes for a list of permitted values. Read only. |
deltaX, deltaY and deltaZ was defined as long at first. Next, they were defined as float. Finally, they are defined as double. The type in IE9 is long.
Constants
Delta modes
| Constant | Value | Description |
DOM_DELTA_PIXEL |
0x00 |
The delta values are specified in pixels. |
|
0x01 |
The delta values are specified in lines. |
DOM_DELTA_PAGE |
0x02 |
The delta values are specified in pages. |
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | 31 | 17.0 (17.0) | 9.0 | 18 | Not supported |
window.WheelEvent |
(Yes) (*1) | 17.0 (17.0) | 9.0 | Not supported | (Yes) (*1) |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | ? | 17.0 (17.0) | ? | ? | ? |
window.WheelEvent |
? | 17.0 (17.0) | ? | ? | ? |
Note that Chrome and Safari don't support D3E's WheelEvent actually; nevertheless they return object for window.WheelEvent.
See also
wheel- Gecko's legacy mouse wheel event object:
MouseScrollEvent - Non-gecko browsers' legacy mouse wheel event object:
MouseWheelEvent
Document Tags and Contributors
Tags:
Contributors to this page: Sheppy, Masayuki, brianblakely, tnajdek, teoli, realityking, Reachmeatshivam
Last updated by:
realityking,