Created
February 19, 2019 12:04
-
-
Save eduardodaluz/0be4ebd83522d5b974b7adf1a51143a0 to your computer and use it in GitHub Desktop.
This file contains 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
/* Mouse move */ | |
setInterval(function() { | |
var mouseMoveEvent = document.createEvent("MouseEvents"); | |
mouseMoveEvent.initMouseEvent( | |
"mousemove", //event type : click, mousedown, mouseup, mouseover, mousemove, mouseout. | |
true, //canBubble | |
false, //cancelable | |
window, //event's AbstractView : should be window | |
1, // detail : Event's mouse click count | |
50, // screenX | |
50, // screenY | |
50, // clientX | |
50, // clientY | |
false, // ctrlKey | |
false, // altKey | |
false, // shiftKey | |
false, // metaKey | |
0, // button : 0 = click, 1 = middle button, 2 = right button | |
null // relatedTarget : Only used with some event types (e.g. mouseover and mouseout). In other cases, pass null. | |
); | |
document.dispatchEvent(mouseMoveEvent) | |
}, 10000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment