W3cubDocs

/DOM

MouseEvent.movementY

The MouseEvent.movementYread-only property provides the shift in the Y coordinate of the mouse pointer between that event and the previous mousemove event. In other words, the value of that property is computed that way : currentEvent.movementY = currentEvent.screenY - previousEvent.screenY.

Syntax

var yShift = instanceOfMouseEvent.movementY

Return value

A number

Specifications

Specification Status Comment
Pointer Lock
The definition of 'MouseEvent.movementY' in that specification.
Candidate Recommendation Initial definition.

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 37
37
22 — 37
Prefixed
Prefixed Requires the vendor prefix: webkit
Yes 41
41
1 — 41
Prefixed
Prefixed Requires the vendor prefix: moz
No ? No
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support 37 37
37
? — 37
Prefixed
Prefixed Requires the vendor prefix: webkit
Yes 41
41
4 — 41
Prefixed
Prefixed Requires the vendor prefix: moz
? No ?

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementY