W3cubDocs

/DOM

MouseEvent.pageY

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. 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.

Syntax

var pos = event.pageY

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 compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 45 Yes Yes 9 Yes Yes
Value type changed from long to double 56 ? No ? ? ?
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support 45 45 Yes ? ? ? ?
Value type changed from long to double 56 56 ? 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/pageY