在PC浏览器上模拟触摸事件 [英] Simulating touch events on a PC browser

查看:1055
本文介绍了在PC浏览器上模拟触摸事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为iPad开发一个HTML应用程序。因此,它利用触摸事件和webkit-CSS动画。

到目前为止,我已经使用chrome作为我的调试环境,因为它是真棒开发者模式。



我希望能够在模拟我的鼠标触摸事件的同时,在我的PC上使用Google-Chrome的调试器来调试我的Html / JavaScript。

我的网站没有任何多点触控事件,也没有鼠标事件(iPad上没有鼠标)。

我真的没有兴趣看到应用程序布局,但更多的是在调试它的行为。



是否有一些插件可以将鼠标事件转换为桌面浏览器中的触摸事件?
<截至2012年4月13日



在Google Chrome开发者和金丝雀版本中,现在有一个模拟触摸事件复选框。

您可以通过打开F12开发人员工具并单击第e屏幕。





现在(Chrome ver.36.0.1985.125)可以在这里找到它:F12 => Esc => Emulation。


I am developing an HTML application for the iPad. As such it utilizes touch events and webkit-CSS animations.

Up until now I have used chrome as my debugging environment because of it's awesome developer mode.

What I would like is to be able to debug my Html/JavaScript using Google-Chrome's debugger on my PC while simulating touch events with my mouse.

My site does not have any multi-touch events and no mouse events (no mouse on iPad).

I am not actually interested in seeing the applications layout, but more in debugging its behavior.

Is there some plugin to get mouse events translated into touch events on a desktop browser?

解决方案

As of April 13th 2012

In Google Chrome developer and canary builds there is now a checkbox for "Emulate touch events"

You can find it by opening the F12 developer tools and clicking on the gear at the bottom right of the screen.

For now (Chrome ver.36.0.1985.125) you can find it here: F12 => Esc => Emulation.

这篇关于在PC浏览器上模拟触摸事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆