Documentation for touchscreen events in Javascript
Where can I find documentation or a reference for touchscreen events in Javascript, ex. "touchstart".
I found this useful link http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript/ (EDIT: page no longer exists) where the events "touchstart", "touchmove" and "touchend" are mentioned for IPhone.
Are there more? What about Blackberry and 开发者_JAVA百科Android? I did not find much on SO and Google.
Edit Here is a good documentation by Apple: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
I used this site when developing a mobile web app http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/
But with research I have gotten a decent list.
- touchstart
- Action: fires when the screen is touched (will fire for multi-point touches as well)
- Equivalent: mousedown
- touchend
- Action: fires when a finger is lifted from a screen (is really finiky with single point touch
- Equivalent: mouseup
- touchmove
- Action: fires when one or more fingers move on the screen
- Equivalent: mousemove
- touchcancel
- Action: when a touch event is canceled by the system
- Equivalent: none that I'm aware
Other touch devices map the touch events to mouse events. Others ignore touch events.
To a Google API discussion - "Apart from mobile safari, there isn't a way to access touch events on desktops that have a touch screen."
精彩评论