WheelEvent

open class WheelEvent(val type: EventType<WheelEvent>, init: WheelEventInit = definedExternally) : MouseEvent(source)

The WheelEvent interface represents events that occur due to the user moving a mouse wheel or similar input device.

MDN Reference

Constructors

Link copied to clipboard
constructor(type: EventType<WheelEvent>, init: WheelEventInit = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The MouseEvent.altKey read-only property is a boolean value that indicates whether the alt key was pressed or not when a given mouse event occurs.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The MouseEvent.button read-only property indicates which button was pressed or released on the mouse to trigger the event.

Link copied to clipboard

The MouseEvent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The clientX read-only property of the MouseEvent interface provides the horizontal coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).

Link copied to clipboard

The clientY read-only property of the MouseEvent interface provides the vertical coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).

Link copied to clipboard
Link copied to clipboard

The MouseEvent.ctrlKey read-only property is a boolean value that indicates whether the ctrl key was pressed or not when a given mouse event occurs.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The WheelEvent.deltaMode read-only property returns an unsigned long representing the unit of the delta values scroll amount.

Link copied to clipboard

The WheelEvent.deltaX read-only property is a double representing the horizontal scroll amount in the You must check the deltaMode property to determine the unit of the deltaX value.

Link copied to clipboard

The WheelEvent.deltaY read-only property is a double representing the vertical scroll amount in the You must check the deltaMode property to determine the unit of the deltaY value.

Link copied to clipboard

The WheelEvent.deltaZ read-only property is a double representing the scroll amount along the z-axis, in the You must check the deltaMode property to determine the unit of the deltaZ value.

Link copied to clipboard
val detail: Int

The UIEvent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val layerX: Int

The MouseEvent.layerX read-only property returns the horizontal coordinate of the event relative to the current layer.

Link copied to clipboard
val layerY: Int

The MouseEvent.layerY read-only property returns the vertical coordinate of the event relative to the current layer.

Link copied to clipboard

The MouseEvent.metaKey read-only property is a boolean value that indicates whether the meta key was pressed or not when a given mouse event occurs.

Link copied to clipboard

The movementX read-only property of the MouseEvent interface provides the difference in the X coordinate of the mouse pointer between the given event and the previous Element/mousemove_event event.

Link copied to clipboard

The movementY read-only property of the MouseEvent interface provides the difference in the Y coordinate of the mouse pointer between the given event and the previous Element/mousemove_event event.

Link copied to clipboard
Link copied to clipboard

The offsetX read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.

Link copied to clipboard

The offsetY read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node.

Link copied to clipboard

The pageX read-only property of the MouseEvent interface returns the X (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document.

Link copied to clipboard

The pageY read-only property of the MouseEvent interface returns the Y (vertical) coordinate (in pixels) at which the mouse was clicked, relative to the top edge of the entire document.

Link copied to clipboard

The MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one.

Link copied to clipboard

The screenX read-only property of the MouseEvent interface provides the horizontal coordinate (offset) of the mouse pointer in screen coordinates.

Link copied to clipboard

The screenY read-only property of the MouseEvent interface provides the vertical coordinate (offset) of the mouse pointer in screen coordinates.

Link copied to clipboard

The MouseEvent.shiftKey read-only property is a boolean value that indicates whether the shift key was pressed or not when a given mouse event occurs.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val type: EventType<WheelEvent>
Link copied to clipboard
val view: Window?

The UIEvent.view read-only property returns the is the Window object the event happened in.

Link copied to clipboard
val x: Double

The MouseEvent.x property is an alias for the MouseEvent.clientX property.

Link copied to clipboard
val y: Double

The MouseEvent.y property is an alias for the MouseEvent.clientY property.

Functions

Link copied to clipboard
open override fun asInit(): WheelEventInit
Link copied to clipboard
Link copied to clipboard

The MouseEvent.getModifierState() method returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, false.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard