MouseEvent.offsetY

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

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
offsetY
Experimental
Chrome Full support YesEdge Full support 12Firefox Full support 39IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 43Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
Value type changed from long to doubleChrome Full support 56Edge Full support ≤79Firefox ? IE ? Opera ? Safari ? WebView Android Full support 56Chrome Android Full support 56Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Full support 6.0

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