Internet Explorer 11是否支持Multi-Touch?

时间:2014-06-16 19:54:55

标签: javascript html5 multi-touch internet-explorer-11

我正在开发一款在Chrome和Firefox上运行良好的多点触控绘图应用程序,但就微软是否直接回答而言,我无法从微软那里得到任何东西(即Internet Explorer 11支持:event.touches。

现在,在其他浏览器中运行的代码片段如下:

window.addEventListener("touchstart", onTouchStart, true);

function onTouchStart(event) {
  console.log(event.touches.length);
}

在Chrome中,它会打印出触摸次数,但我在Internet Explorer中什么也得不到。如果有人知道这是否是IE的问题我会很感激。

感谢。

1 个答案:

答案 0 :(得分:2)

IE有不同的方法: W3C指针事件 http://msdn.microsoft.com/en-us/library/ie/dn433244.aspx

p.s。:如果您只是想测试多点触控支持,请使用navigator.msMaxTouchPoints

if (navigator.msMaxTouchPoints > 1) { ... }