Last active
August 29, 2015 14:08
-
-
Save kolodny/b9480d7d297c33f48e66 to your computer and use it in GitHub Desktop.
get-events
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 HTMLElements = [ | |
'HTMLAllCollection', | |
'HTMLAnchorElement', | |
'HTMLAppletElement', | |
'HTMLAreaElement', | |
'HTMLAudioElement', | |
'HTMLBRElement', | |
'HTMLBaseElement', | |
'HTMLBodyElement', | |
'HTMLButtonElement', | |
'HTMLCanvasElement', | |
'HTMLCollection', | |
'HTMLContentElement', | |
'HTMLDListElement', | |
'HTMLDataListElement', | |
'HTMLDialogElement', | |
'HTMLDirectoryElement', | |
'HTMLDivElement', | |
'HTMLDocument', | |
'HTMLElement', | |
'HTMLEmbedElement', | |
'HTMLFieldSetElement', | |
'HTMLFontElement', | |
'HTMLFormControlsCollection', | |
'HTMLFormElement', | |
'HTMLFrameElement', | |
'HTMLFrameSetElement', | |
'HTMLHRElement', | |
'HTMLHeadElement', | |
'HTMLHeadingElement', | |
'HTMLHtmlElement', | |
'HTMLIFrameElement', | |
'HTMLImageElement', | |
'HTMLInputElement', | |
'HTMLKeygenElement', | |
'HTMLLIElement', | |
'HTMLLabelElement', | |
'HTMLLegendElement', | |
'HTMLLinkElement', | |
'HTMLMapElement', | |
'HTMLMarqueeElement', | |
'HTMLMediaElement', | |
'HTMLMenuElement', | |
'HTMLMetaElement', | |
'HTMLMeterElement', | |
'HTMLModElement', | |
'HTMLOListElement', | |
'HTMLObjectElement', | |
'HTMLOptGroupElement', | |
'HTMLOptionElement', | |
'HTMLOptionsCollection', | |
'HTMLOutputElement', | |
'HTMLParagraphElement', | |
'HTMLParamElement', | |
'HTMLPictureElement', | |
'HTMLPreElement', | |
'HTMLProgressElement', | |
'HTMLQuoteElement', | |
'HTMLScriptElement', | |
'HTMLSelectElement', | |
'HTMLShadowElement', | |
'HTMLSourceElement', | |
'HTMLSpanElement', | |
'HTMLStyleElement', | |
'HTMLTableCaptionElement', | |
'HTMLTableCellElement', | |
'HTMLTableColElement', | |
'HTMLTableElement', | |
'HTMLTableRowElement', | |
'HTMLTableSectionElement', | |
'HTMLTemplateElement', | |
'HTMLTextAreaElement', | |
'HTMLTitleElement', | |
'HTMLTrackElement', | |
'HTMLUListElement', | |
'HTMLUnknownElement', | |
'HTMLVideoElement', | |
]; | |
var events = [ | |
'click', | |
'contextmenu', | |
'dblclick', | |
'mousedown', | |
'mouseenter', | |
'mouseleave', | |
'mousemove', | |
'mouseover', | |
'mouseout', | |
'mouseup', | |
'keydown', | |
'keypress', | |
'keyup', | |
'abort', | |
'beforeunload', | |
'error', | |
'hashchange', | |
'load', | |
'pageshow', | |
'resize', | |
'scroll', | |
'unload', | |
'blur', | |
'change', | |
'focus', | |
'focusin', | |
'focusout', | |
'input', | |
'reset', | |
'search', | |
'select', | |
'submit', | |
'drag', | |
'dragend', | |
'dragenter', | |
'dragleave', | |
'dragover', | |
'dragstart', | |
'drop', | |
'copy', | |
'cut', | |
'paste', | |
'afterprint', | |
'beforeprint', | |
'abort', | |
'canplay', | |
'canplaythrough', | |
'durationchange', | |
'ended', | |
'error', | |
'loadeddata', | |
'loadedmetadata', | |
'loadstart', | |
'pause', | |
'play', | |
'playing', | |
'progress', | |
'ratechange', | |
'seeked', | |
'seeking', | |
'stalled', | |
'suspend', | |
'timeupdate', | |
'volumechange', | |
'waiting', | |
'imationend', | |
'imationiteration', | |
'imationstart', | |
'ansitionend', | |
'wheel', | |
'online', | |
'offline', | |
'show', | |
'toggle', | |
'wheel' | |
] | |
HTMLElements.forEach(function(Element) { | |
for (var i in window[Element].prototype) { | |
if (window[Element].prototype.hasOwnProperty(i)) { | |
if (events.indexOf(i) > -1) { | |
console.log(Element, i); | |
} | |
} | |
} | |
}); |
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
HTMLDialogElement show | |
HTMLElement click | |
HTMLFormElement submit | |
HTMLFormElement reset | |
HTMLInputElement select | |
HTMLMediaElement load | |
HTMLMediaElement play | |
HTMLMediaElement pause | |
HTMLTextAreaElement select |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment