开发者

Triggering swipe and touch events on a mobile web app? - iPhone/Android

Wondering if there is a way I could trigger an event, so that any library listening for these events (e.g. jQTouch, Sencha touch, iUI, ... ).

If I could e开发者_运维百科xtend or use jQuery for such task e.g. $(...).trigger('event') that would be great to know.


Usage example:

I need to debug a few web apps by simulating multi touch with my mouse. This seems a little complicated, so if I could trigger the multi-touch events using Javascript I could therefore test the app more efficiently.


Any ideas?


Not sure if this is in webkit, but it may be useful: https://developer.mozilla.org/en/DOM/element.dispatchEvent

Lets you fire events such as 'click', so if the function exists in webkit then it should also work for touch events.


The Android Code Monkey might already do what you're looking for...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜