Is it possible to get gesture events, such as a 3 finger swipe back, on Webkit on the Mac desktop in Javascript? I did a few Google searches and couldn’t find anything. Otherwise, I guess I could pass them from Cocoa to a WebView. I am particularly interested in the 3 finger swipe back.
EDIT
It appears that even in the Sencha Touch Kitchen Sink app on the latest Webkit night nighlies on my Macbook Pro, swipe events aren’t detected. However there is an easier solution for me to simply use the browser history state when doing partial Ajax style page updates (duh, can’t believe I didn’t think of that) with the Backbone.js history plugin so that the user can go back using the browser back button, or 3 finger swipe.
Webkit is not compatible with the touch API for the moment.
If you want to know if the touch events api is supported, you can use modernizr and modify your UI depending to the results …
Download it here : http://www.modernizr.com/ Then write something like this :
Modernizr customize also your body element’s class, so you can access to it with CSS
You can complete it with yepnope js : http://yepnopejs.com/
And when the events are supported, you can use jQuery mobile.