The pageY
read-only property of the MouseEvent
interface returns the Y (vertical) coordinate in pixels of the event relative to the whole document. This property takes into account any vertical scrolling of the page.
Syntax
var pos = event.pageY;
Originally, this property was defined as a long
integer. The CSSOM View Module redefined it as a double
float. See the Browser compatibility section for details.
Examples
var pageY = event.pageY;
Specifications
Specification | Status | Comment |
---|---|---|
CSS Object Model (CSSOM) View Module The definition of 'pageY' in that specification. |
Working Draft | Redefined from long to double . |
Touch Events The definition of 'pageY' in that specification. |
Unknown | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
pageY | Chrome Full support 45 | Edge Full support 12 | Firefox Full support Yes | IE Full support 9 | Opera Full support Yes | Safari Full support Yes | WebView Android Full support 45 | Chrome Android Full support 45 | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support 5.0 |
Value type changed from long to double | Chrome Full support 56 | Edge Full support ≤79 | Firefox No support No | IE ? | Opera ? | Safari ? | WebView Android Full support 56 | Chrome Android Full support 56 | Firefox Android No support No | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 6.0 |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.