WheelEvent class
The interface represents events that occur due to the user moving a mouse wheel or similar input device.
Note: This is the standard wheel event interface to use. Old
versions of browsers implemented the non-standard and
non-cross-browser-compatible MouseWheelEvent
and
MouseScrollEvent
interfaces. Use this interface and avoid the
non-standard ones.
Note: Do not confuse the wheel
event with the scroll
event.
The default action of a wheel
event is implementation-defined.
Thus, a wheel
event doesn't necessarily dispatch a scroll
event. Even when it does, that doesn't mean that the delta*
values in the wheel
event necessarily reflect the content's
scrolling direction. Therefore, do not rely on delta*
properties to get the content's scrolling direction. Instead,
detect value changes to scrollLeft
and scrollTop
of the
target in the scroll
event.
Event
UIEvent
MouseEvent
WheelEvent
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- WheelEvent(String type, [WheelEventInit? eventInitDict])
-
factory
Properties
- altKey → bool
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - bubbles → bool
-
Available on Event, provided by the PropsEvent extension
no setter -
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter -
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - cancelable → bool
-
Available on Event, provided by the PropsEvent extension
no setter - cancelBubble ↔ bool
-
Available on Event, provided by the PropsEvent extension
getter/setter pair - clientX → int
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - clientY → int
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - composed → bool
-
Available on Event, provided by the PropsEvent extension
no setter - ctrlKey → bool
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - currentTarget → EventTarget?
-
Available on Event, provided by the PropsEvent extension
no setter - defaultPrevented → bool
-
Available on Event, provided by the PropsEvent extension
no setter - deltaMode → int
-
Available on WheelEvent, provided by the PropsWheelEvent extension
no setter - deltaX → double
-
Available on WheelEvent, provided by the PropsWheelEvent extension
no setter - deltaY → double
-
Available on WheelEvent, provided by the PropsWheelEvent extension
no setter - deltaZ → double
-
Available on WheelEvent, provided by the PropsWheelEvent extension
no setter - detail → int
-
Available on UIEvent, provided by the PropsUIEvent extension
no setter - eventPhase → int
-
Available on Event, provided by the PropsEvent extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isTrusted → bool
-
Available on Event, provided by the PropsEvent extension
no setter - metaKey → bool
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - movementX → double
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - movementY → double
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - offsetX → double
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - offsetY → double
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - pageX → double
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - pageY → double
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter -
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - returnValue ↔ dynamic
-
Available on Event, provided by the PropsEvent extension
getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenX → int
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - screenY → int
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - shiftKey → bool
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - sourceCapabilities → InputDeviceCapabilities?
-
Available on UIEvent, provided by the PropsUIEvent extension
no setter - srcElement → EventTarget?
-
Available on Event, provided by the PropsEvent extension
no setter - target → EventTarget?
-
Available on Event, provided by the PropsEvent extension
no setter - timeStamp → double
-
Available on Event, provided by the PropsEvent extension
no setter - type → String
-
Available on Event, provided by the PropsEvent extension
no setter - view → Window?
-
Available on UIEvent, provided by the PropsUIEvent extension
no setter - which → int
-
Available on UIEvent, provided by the PropsUIEvent extension
no setter - x → double
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter - y → double
-
Available on MouseEvent, provided by the PropsMouseEvent extension
no setter
Methods
-
composedPath(
) → Iterable< EventTarget> -
Available on Event, provided by the PropsEvent extension
-
getModifierState(
String keyArg) → bool -
Available on MouseEvent, provided by the PropsMouseEvent extension
-
initEvent(
String type, [bool? bubbles = false, bool? cancelable = false]) → void -
Available on Event, provided by the PropsEvent extension
-
initMouseEvent(
String typeArg, [bool? bubblesArg = false, bool? cancelableArg = false, Window? viewArg, int? detailArg = 0, int? screenXArg = 0, int? screenYArg = 0, int? clientXArg = 0, int? clientYArg = 0, bool? ctrlKeyArg = false, bool? altKeyArg = false, bool? shiftKeyArg = false, bool? metaKeyArg = false, int? buttonArg = 0, ]) → void -
Available on MouseEvent, provided by the PropsMouseEvent extension
-
initUIEvent(
String typeArg, [bool? bubblesArg = false, bool? cancelableArg = false, Window? viewArg, int? detailArg = 0]) → void -
Available on UIEvent, provided by the PropsUIEvent extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preventDefault(
) → void -
Available on Event, provided by the PropsEvent extension
-
stopImmediatePropagation(
) → void -
Available on Event, provided by the PropsEvent extension
-
stopPropagation(
) → void -
Available on Event, provided by the PropsEvent extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- domDeltaLine → int
-
no setter
- domDeltaPage → int
-
no setter
- domDeltaPixel → int
-
no setter