WheelEvent

Did you know that you can read content offline by using one of these tools? If you would like to read offline MDN content in another format, let us know by commenting on Bug 665750.

Dash App
この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

An event interface for mouse wheel events
1.0
24
Introduced
Gecko 17.0
Inherits from: nsIDOMWheelEvent Last changed in Gecko 17.0 (Firefox 17.0 / Thunderbird 17.0 / SeaMonkey 2.14)

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.
deltaY 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.
DOM_DELTA_LINE 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 Not supported 17.0 (17.0) 9.0 Not supported 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

タグ (6)