Skip to content

Instantly share code, notes, and snippets.

@msbrime
Created October 29, 2017 19:34
Show Gist options
  • Save msbrime/05ba1075bc8b3f9864b5477a6930525f to your computer and use it in GitHub Desktop.
Save msbrime/05ba1075bc8b3f9864b5477a6930525f to your computer and use it in GitHub Desktop.
Get all events supported by a particular browser
function getBrowserEvents ()
{
var browserEvents = [];
for (var e in document) if (typeof document[e] !== "function" && e !== null && e.substring(0, 2) === "on") browserEvents[browserEvents.length] = e.substring(2);
return browserEvents;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment