Fire touch events when corresponding mouse events fire.
- mousedown -> touchstart
- mousemove -> touchmove
- mouseup -> touchend
$ npm install simulate-touchvar simulateTouch = require('simulate-touch')
simulateTouch(document.body)
document.body.addEventListener('touchstart', function () {
console.log('touch start')
})
document.body.dispatchEvent([mousedown event])
// touch startedSee test.js for more info.