This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The offsetY read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node. 

Syntax

var yOffset = instanceOfMouseEvent.offsetY;

Return value

A double floating point value. Early versions of the spec defined this as an integer. See the Browser compatibility section for details.

Specifications

Specification Status Comment
CSS Object Model (CSSOM) View Module
The definition of 'MouseEvent' in that specification.
Working Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Experimental
Chrome Full support YesEdge Full support YesFirefox Full support 39IE Full support 6Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 43Opera Android ? Safari iOS ? Samsung Internet Android ?
Value type changed from long to doubleChrome Full support 56Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android Full support 56Chrome Android Full support 56Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

See also

Document Tags and Contributors

Contributors to this page: fscholz, JonMarkPerry, jpmedley, libbymc, teoli, cvrebert, Sheppy
Last updated by: fscholz,