redraw/dom/event/wheel
The WheelEvent
interface represents events that occur due to the user
moving a mouse wheel or similar input device.
This is the standard wheel event interface to use. Old versions of browsers implemented the non-standard and non-cross-browser-compatible
MouseWheelEvent
andMouseScrollEvent
interfaces. Use this interface and avoid the non-standard ones.
Don’t confuse the wheel event with the scroll
event:
- A
wheel
event doesn’t necessarily dispatch ascroll
event. For example, the element may be unscrollable at all. Zooming actions using the wheel or trackpad also firewheel
events. - A
scroll
event isn’t necessarily triggered by awheel
event. Elements can also be scrolled by using the keyboard, dragging a scrollbar, or using JavaScript. - Even when the
wheel
event does trigger scrolling, thedelta*
values in thewheel
event don’t necessarily reflect the content’s scrolling direction.
Types
pub type WheelEvent
Values
pub const as_mouse_event: fn(WheelEvent) -> mouse.MouseEvent
WheelEvent
inherits MouseEvent
.