The MouseEvent.movementY
read-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
.
var yShift = instanceOfMouseEvent.movementY
A number
Specification | Status | Comment |
---|---|---|
Pointer Lock The definition of 'MouseEvent.movementY' in that specification. | Candidate Recommendation | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 37
|
Yes | 41
|
No | ? | No |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | 37 | 37
|
Yes | 41
|
? | No | ? |
© 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