Created
December 16, 2015 10:24
-
-
Save sergeysova/77600eac4919eae5902c 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
var button = document.createElement('button'); | |
button.onclick = function(e) { alert('clicked button', e); } | |
var clickEvent = new Event('click'); | |
button.dispatchEvent(clickEvent); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment