HTML DOM TouchEvent

❮ DOM Events ❮ Event Objects


The TouchEvent Object

The TouchEvent Object handles events that occur when a user touches a touch-based device.

Touch Events

Event Occurs When
ontouchcancel A touch is interrupted
ontouchend A finger is removed from a touch screen
ontouchmove A finger is dragged across the screen
ontouchstart A finger is placed on a touch screen

TouchEvent Properties

Property Returns
altKey If the ALT key was pressed when the event was triggered
changedTouches A list of the touch objects whose state changed between this and the previous touch
ctrlKey If the CTRL key was pressed when the event was triggered
metaKey If the META key was pressed when the event was triggered
shiftKey If the SHIFT key was pressed when the event was triggered
targetTouches A list of the touch objects that are in contact with the surface and where the touchstart event occured on the same target element as the current target element
touches A list of the touch objects that are currently in contact with the surface

Inherited Properties and Methods

The TouchEvent inherits all the properties and methods from:

The UiEvent

The Event Object


❮ DOM Events ❮ Event Objects

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.