Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var simulateTouch = require('simulate-touch')
- simulateTouch(document.body)
- document.body.addEventListener('touchstart', function () {
- console.log('touch start')
- })
- var mousedownEvent = document.createEvent("MouseEvent");
- mousedownEvent.initMouseEvent(event, true, true, window, 0,
- 0, 0, 0, 0,
- false, false, false, false,
- 0, null);
- document.body.dispatchEvent(mousedownEvent)
- // touch started
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement