![]() ![]() ![]() client/page/screen coordinates: where on the screen the action happened. ![]() target: the DOM element that was the target of the action.identifier: a number that uniquely identifies the current finger in the touch session.These lists consist of objects that contain touch information: For example, in a touchend event, this will be the finger that was removed. changedTouches: a list of fingers involved in the current event.targetTouches: a list of fingers on the current DOM element.touches: a list of all fingers currently on the screen.touchend: a finger is removed from a DOM element.Įach touch event includes three lists of touches:.touchmove: a finger is dragged along a DOM element.touchstart: a finger is placed on a DOM element.Three basic touch events are outlined in the spec and implemented widely across mobile devices: In this article I’ll dive into the touch events API provided by iOS and Android devices, as well as desktop Chrome on hardware that supports touch, and explore what sorts of applications you can build, present some best practices, and cover useful techniques that make it easier to develop touch-enabled applications. Recently a W3C working group has come together to work on this touch events specification. Android has been catching up to this de-facto standard and closing the gap. For example, nearly any fast-paced game requires the player to press multiple buttons at once, which, in the context of a touchscreen, implies multi-touch.Īpple introduced their touch events API in iOS 2.0. As the mobile web evolves to enable increasingly sophisticated applications, web developers need a way to handle these events. Mobile devices such as smartphones and tablets usually have a capacitive touch-sensitive screen to capture interactions made with the user's fingers. Make use of targetTouches and changedTouches. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |