Created
March 1, 2011 09:39
-
-
Save jacob414/848902 to your computer and use it in GitHub Desktop.
Logs as many events as possible
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
// Log as many events as possible, with event names grabbed from | |
// webkit sources: | |
// http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/dom/EventNames.h | |
known = [ | |
'abort', | |
'beforecopy', | |
'beforecut', | |
'beforeload', | |
'beforepaste', | |
'beforeprocess', | |
'beforeunload', | |
'blur', | |
'cached', | |
'change', | |
'checking', | |
'click', | |
'close', | |
'complete', | |
'compositionend', | |
'compositionstart', | |
'compositionupdate', | |
'connect', | |
'contextmenu', | |
'copy', | |
'cut', | |
'dblclick', | |
'devicemotion', | |
'deviceorientation', | |
'display', | |
'downloading', | |
'drag', | |
'dragend', | |
'dragenter', | |
'dragleave', | |
'dragover', | |
'dragstart', | |
'drop', | |
'error', | |
'focus', | |
'focusin', | |
'focusout', | |
'formchange', | |
'forminput', | |
'hashchange', | |
'input', | |
'invalid', | |
'keydown', | |
'keypress', | |
'keyup', | |
'load', | |
'loadstart', | |
'message', | |
'mousedown', | |
'mousemove', | |
'mouseout', | |
'mouseover', | |
'mouseup', | |
'mousewheel', | |
'noupdate', | |
'obsolete', | |
'offline', | |
'online', | |
'open', | |
'overflowchanged', | |
'pagehide', | |
'pageshow', | |
'paste', | |
'popstate', | |
'readystatechange', | |
'reset', | |
'resize', | |
'scroll', | |
'search', | |
'select', | |
'selectstart', | |
'storage', | |
'submit', | |
'textInput', | |
'unload', | |
'updateready', | |
'write', | |
'writeend', | |
'writestart', | |
'zoom', | |
'DOMActivate', | |
'DOMFocusIn', | |
'DOMFocusOut', | |
'DOMAttrModified', | |
'DOMCharacterDataModified', | |
'DOMNodeInserted', | |
'DOMNodeInsertedIntoDocument', | |
'DOMNodeRemoved', | |
'DOMNodeRemovedFromDocument', | |
'DOMSubtreeModified', | |
'DOMContentLoaded', | |
'webkitBeforeTextInserted', | |
'webkitEditableContentChanged', | |
'canplay', | |
'canplaythrough', | |
'durationchange', | |
'emptied', | |
'ended', | |
'loadeddata', | |
'loadedmetadata', | |
'pause', | |
'play', | |
'playing', | |
'ratechange', | |
'seeked', | |
'seeking', | |
'timeupdate', | |
'volumechange', | |
'waiting', | |
'webkitbeginfullscreen', | |
'webkitendfullscreen', | |
'progress', | |
'stalled', | |
'suspend', | |
'webkitAnimationEnd', | |
'webkitAnimationStart', | |
'webkitAnimationIteration', | |
'webkitTransitionEnd', | |
'orientationchange', | |
'timeout', | |
'touchstart', | |
'touchmove', | |
'touchend', | |
'touchcancel', | |
'success', | |
'loadend', | |
'webkitfullscreenchange', | |
'webkitspeechchange', | |
'webglcontextlost', | |
'webglcontextrestored', | |
'webglcontextcreationerror', | |
'audioprocess']; | |
function lognamed(name) { | |
document.addEventListener(name, function() { | |
console.log(name); | |
}, true); | |
} | |
known.forEach(function(name) { | |
lognamed(name); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is awesome thanks