且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用棘轮启用push.js ajax内容加载器

更新时间:2023-12-05 10:49:04

Ratchet可以处理触摸事件,这些事件在浏览器中不可用。在Chrome中,转到chrome:// flags /并启用强制启用触摸事件。这应该成为浏览器开发的诀窍。如果你想在没有标志的桌面上工作,你将需要一个js框架来将触摸事件转换为指针事件。像 https://github.com/maker/ratchet/blob/master/docs/ js / fingerblast.js 应该可以解决问题。

Ratchet works off of touch events, which are not available in your browser. In Chrome go to chrome://flags/ and enable "Force enable touch events". That should do the trick for browser development. If you want to make this work on desktops without the flag you are going to need a js framework to convert touch events to pointer events. Something like https://github.com/maker/ratchet/blob/master/docs/js/fingerblast.js should do the trick.