WheelEvent: deltaMode-Eigenschaft
Die schreibgeschützte Eigenschaft WheelEvent.deltaMode
gibt ein
unsigned long
zurück, das die Einheit des Delta-Werte-Scrollwerts darstellt.
Erlaubte Werte sind:
Konstante | Wert | Beschreibung |
---|---|---|
DOM_DELTA_PIXEL |
0x00 |
Die Delta-Werte werden in Pixel angegeben. |
DOM_DELTA_LINE |
0x01 |
Die Delta-Werte werden in Zeilen angegeben. |
DOM_DELTA_PAGE |
0x02 |
Die Delta-Werte werden in Seiten angegeben. |
Wert
Ein unsigned long
.
Beispiele
js
const syntheticEvent = new WheelEvent("syntheticWheel", {
deltaX: 4,
deltaMode: 0,
});
console.log(syntheticEvent.deltaMode);
Spezifikationen
Specification |
---|
UI Events # dom-wheelevent-deltamode |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
deltaMode |
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.