WheelEvent: deltaZ property
Please help us by answering a few questions.
The WheelEvent.deltaZ
read-only property is a
double
representing the scroll amount along the z-axis, in the
WheelEvent.deltaMode
unit.
You must check the deltaMode
property to determine the unit of the deltaZ
value. Do not assume that the deltaZ
value is specified in pixels. Some browsers, for compatibility reasons, may return different units for the deltaZ
value depending on whether deltaMode
has been accessed, to accommodate for websites not explicitly checking the deltaMode
property.
Value
A number.
Examples
js
const syntheticEvent = new WheelEvent("syntheticWheel", {
deltaZ: 4,
deltaMode: 0,
});
console.log(syntheticEvent.deltaZ);
Specifications
Specification |
---|
UI Events # dom-wheelevent-deltaz |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
deltaZ |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.