Skip to content

Instantly share code, notes, and snippets.

@alexcmd
Created April 12, 2016 09:14
Show Gist options
  • Save alexcmd/b7d324880765a2644ebc077406166a8a to your computer and use it in GitHub Desktop.
Save alexcmd/b7d324880765a2644ebc077406166a8a to your computer and use it in GitHub Desktop.
function getAllEvents(element) {
var result = [];
for (var key in element) {
if (key.indexOf('on') === 0) {
result.push(key.slice(2));
}
}
return result.join(' ');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment