I'm not convinced you need any additional code here.

Touch events are already fired by the web view containers. You could build
up gesture detection in JavaScript by listening to these events.

There are libraries out there that do this for you already:

 - http://eightmedia.github.io/hammer.js/
 - http://quojs.tapquo.com/
 - https://github.com/plainview/Jester
 - jquery ui plugin: http://touchpunch.furf.com/
 - jquery plugin: http://labs.rampinteractive.co.uk/touchSwipe/demos/
 - moar jquery: https://github.com/HotStudio/touchy

On 4/17/13 9:42 AM, "jbo...@openmv.com" <jbo...@openmv.com> wrote:

>I'm experimenting with Cordova on Android, iOS and Windows 8.
>
>Has there been a discussion around trying to implement to set of
>'standard' gesture recognizers:
>http://msdn.microsoft.com/library/windows/apps/BR241937
>http://developer.apple.com/library/ios/#documentation/EventHandling/Concep
>tual/EventHandlingiPhoneOS/GestureRecognizer_basics/GestureRecognizer_basi
>cs.html
>http://developer.android.com/reference/android/view/GestureDetector.html
>
>The idea would be that the native side executes JavaScript like:
>javascript:cordova.fireEvent('tap', {node: document.elementFromPoint(400,
>300), x: 400, y:300 });
>javascript:cordova.fireEvent('slide', {node:
>document.elementFromPoint(400, 300), x: 400, y:300});
>
>This function could use document.createEvent to initiate events on the
>DOM node:
>https://developer.mozilla.org/en-US/docs/DOM/document.createEvent
>
>The purpose of this would be to have a consistent set of gesture
>recognition across different devices instead of having javascript code in
>the 'WebView' trying to do gesture detection.
>
>Thoughts? 
>

Reply via email to