This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

WheelEvent

Summary

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

Inherits from MouseEventMouseEvent

Properties

deltaMode
Gets a value that indicates the unit of measurement for delta values.
deltaX
Gets the distance that a mouse wheel has rotated around the x-axis (horizontal).
deltaY
Gets the distance that a mouse wheel has rotated around the y-axis (vertical).
deltaZ
Gets the distance that a mouse wheel has rotated around the z-axis.

Methods

initWheelEvent
Initializes a new WheelEvent that the createEvent method created.

Events

No events.

Inherited from MouseEvent

Properties

button
Gets the mouse button that caused an event.
buttons
Gets a value that indicates which mouse buttons a user pressed.
clientX
Gets the x-coordinate of the mouse pointer, relative to the upper-left corner of the viewport (that is, the user agent’s client area).
clientY
Gets the y-coordinate of the mouse pointer, relative to the upper-left corner of the viewport (that is, the user agent’s client area).
layerX
Gets the x-coordinate of the mouse pointer, relative to the last positioned ancestor element.
layerY
Returns the horizontal coordinate of the event relative to the current layer. layerY is a non-standards property of the MouseEvent object.
relatedTarget
Gets the secondary element that is involved in an event. The relatedTarget property is used to find the other element, if any, involved in an event. Events like mouseover are oriented around a certain target, but also involve a secondary target, such as the target that is exited as the mouseover event fires for the primary target.
screenX
Gets the x-coordinate of the mouse pointer, relative to the upper-left corner of the screen.
screenY
Gets the y-coordinate of the mouse pointer, relative to the upper-left corner of the screen.
x
Gets the x-coordinate of the mouse cursor, relative to the last positioned ancestor element.
y
Gets the y-coordinate of the mouse pointer, relative to the last positioned ancestor element.

Methods

initMouseEvent
Initializes a new mouse event that the createEvent method created.

Events

click
The click event is triggered for an element when it is activated by a mouse click or by another user action that normally has the same effect as a mouse click.
dblclick
A mouse double click event.
mousedown
Fires when the user clicks the object with either mouse button or taps the mouse pad.
mouseenter
Fires when the user moves the mouse pointer into the object.
mouseleave
Fires when the user moves the mouse pointer outside the boundaries of the object.
mousemove
Fires when the user moves the mouse over the object.
mouseout
Fires when the user moves the mouse pointer outside the boundaries of the object.
mouseover
Fires when the user moves the mouse pointer into the object.
mouseup
Fires when the user releases a mouse button while the mouse is over the object.

Inherited from UIEvent

Properties

detail

Gets additional, developer defined, information about an event.

view

Gets the window object that an event is generated from.

[object window]

Methods

initUIEvent
Initializes a new user interface event that the createEvent method created.

Events

abort
Fires when the user aborts the download.
activate
Fires when the object is set as the active element.

Inherited from Event

Properties

bubbles
Gets a value that indicates whether an event propagates up from the event target.
cancelable
Gets a value that indicates whether you can cancel an event’s default action.
currentTarget
Gets the event target that is currently being processed.
defaultPrevented
Gets whether the default action should be canceled.
eventPhase
Gets the event phase that is being evaluated.
isTrusted
Gets a value that indicates whether a trusted event source created an event.
target
Gets the element that is the original target of the event.
timeStamp
Gets the time, in milliseconds, when an event occurred.
type
Gets the name of an event.

Methods

initEvent
Initializes a new generic event that the createEvent method created.
preventDefault
Cancels the default action of an event, if possible.
stopImmediatePropagation
Prevents any further propagation of an event.
stopPropagation
Prevents propagation of an event beyond the current target.

Events

DOMContentLoaded
:

afterprint
:

afterupdate
:

beforeactivate
:

beforecopy
:

beforecut
:

beforeeditfocus
:

beforepaste
:

beforeprint
:

beforeunload
:

beforeupdate
:

bounce
:

cellchange
:

change
:

contextmenu
:

controlselect
:

copy
:

cut
Fires after a data selection is cut to the clipboard.
dataavailable
Fires when new data at a data source becomes available.
datasetchanged
Fires when content at a data source has changed.
datasetcomplete
Fires when data transfer from the data source has completed.
deactivate
Sets an active version of an object to not active.
error
Fires when an error occurs.
errorupdate
Executes any error handling associated with the event.

filterchange
:

finish
:

Related specifications

DOM Level 3 Events
Working Draft

Attributions

  • Mozilla Developer Network cc-by-sa-small-wpd.svg: [WheelEvent Article]

  • Microsoft Developer Network: [WheelEvent Article]