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. |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 22.0 webkit 37.0 unprefixed | (Yes) | 1.0 (1.7 or earlier) moz 41 (41) | No support | ? | No support |
Feature | Android Webview | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | 37.0 | (Yes) | 1.0 (1.0) moz 41.0 (41) | ? | ? | ? |
(Yes) webkit 37.0 unprefixed |
© 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