WheelEvent: deltaMode プロパティ
WheelEvent.deltaMode
は読み取り専用のプロパティで、デルタ値のスクロール量の単位を表す unsigned long
を返します。
取りうる値は次の通りです。
定数 | 値 | 説明 |
---|---|---|
DOM_DELTA_PIXEL |
0x00 |
デルタ値はピクセル数で指定されます。 |
DOM_DELTA_LINE |
0x01 |
デルタ値は行数で指定されます。 |
DOM_DELTA_PAGE |
0x02 |
デルタ値はページ数で指定されます。 |
値
unsigned long
です。
例
js
const syntheticEvent = new WheelEvent("syntheticWheel", {
deltaX: 4,
deltaMode: 0,
});
console.log(syntheticEvent.deltaMode);
仕様書
Specification |
---|
UI Events # dom-wheelevent-deltamode |
ブラウザーの互換性
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.