Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
touchevent
var te = document.createEvent('TouchEvent');
var touch = document.createTouch(window, document, 0,0,0,0,0);
var touchList = document.createTouchList(touch);
te.initTouchEvent('touchstart', true, true, window, {}, false, false, false, false,touchList,touchList,touchList);
te.view = window;
te.altKey = false;
te.ctrlKey = false;
te.shiftKey = false;
te.metaKey = false;
document.dispatchEvent(te);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.