Created
November 8, 2013 22:44
-
-
Save pennyfx/7378881 to your computer and use it in GitHub Desktop.
touchevent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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