更新时间:2023-02-01 21:05:35
Safari 9在桌面上支持它。请参阅回复在Apple的WebKit DOM编程主题中强制触摸JavaScript中的事件。
我找不到任何关于在iOS上的Safari 9中使用它的文档。 / p>
The iPhones 6s has 3D touch API for native apps. I was wondering if Apple has enabled 3D touch access from Javascript for a web app?
Just like we use standard touch events
element.addEventListener("touchstart", handleStart, false);
Safari 9 supports it on desktop. See Responding to Force Touch Events from JavaScript in Apple's WebKit DOM Programming Topics.
I can't find any documentation on using it from Safari 9 on iOS, though.