-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathall_events.js
59 lines (43 loc) · 13.2 KB
/
all_events.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// adapted from https://gist.github.com/galpx/9889e557ac127499cd8dc3942a58500b
function _isEvent(prop) {
return 0 === prop.indexOf('on');
}
function _getEvents(obj) {
const result = new Set();
for (let prop in obj) {
if (_isEvent(prop)) {
prop = prop.substr(2); // remove "on" at the beginning
result.add(prop);
}
}
return result;
}
function getEvents() {
let result = _getEvents(window, hasOwnProperty);
const arr = Object.getOwnPropertyNames(window);
for (let i = 0; i < arr.length; i++) {
const element = arr[i];
try {
const obj = window[element];
if (!obj || !obj['prototype']) {
continue;
}
proto = obj['prototype'];
result = new Set([...result, ..._getEvents(proto)]);
} catch (err) {
// console.error(`failed to get events of %o`, element);
}
}
return result;
}
let results = getEvents();
console.log(results);
copy(JSON.stringify([...results]))
// 227
chrome_98 = ["search","appinstalled","beforeinstallprompt","beforexrselect","abort","blur","cancel","canplay","canplaythrough","change","click","close","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","error","focus","formdata","input","invalid","keydown","keypress","keyup","load","loadeddata","loadedmetadata","loadstart","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","reset","resize","scroll","securitypolicyviolation","seeked","seeking","select","slotchange","stalled","submit","suspend","timeupdate","toggle","volumechange","waiting","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend","wheel","auxclick","gotpointercapture","lostpointercapture","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","pointerenter","pointerleave","selectstart","selectionchange","animationend","animationiteration","animationstart","transitionrun","transitionstart","transitionend","transitioncancel","afterprint","beforeprint","beforeunload","hashchange","languagechange","message","messageerror","offline","online","pagehide","pageshow","popstate","rejectionhandled","storage","unhandledrejection","unload","devicemotion","deviceorientation","deviceorientationabsolute","pointerrawupdate","copy","cut","paste","beforecopy","beforecut","beforepaste","fullscreenchange","fullscreenerror","webkitfullscreenchange","webkitfullscreenerror","encrypted","waitingforkey","negotiationneeded","icecandidate","signalingstatechange","iceconnectionstatechange","connectionstatechange","icegatheringstatechange","icecandidateerror","track","datachannel","addstream","removestream","addtrack","removetrack","active","inactive","timeout","loadend","readystatechange","pointerlockchange","pointerlockerror","freeze","resume","visibilitychange","open","enter","exit","audioprocess","begin","end","repeat","statechange","bufferedamountlow","closing","tonechange","resourcetimingbufferfull","complete","Line","mute","unmute","start","stop","dataavailable","success","blocked","upgradeneeded","versionchange","enterpictureinpicture","leavepictureinpicture","chargingchange","chargingtimechange","dischargingtimechange","levelchange","processorerror","finish","remove","reading","activate","midimessage","devicechange","keystatuseschange","managedconfigurationchange","gatheringstatechange","selectedcandidatepairchange","controllerchange","updatefound","gattserverdisconnected","characteristicvaluechanged","connect","disconnect","inputreport","shippingaddresschange","shippingoptionchange","paymentmethodchange","payerdetailchange","terminate","connectionavailable","geometrychange","release","inputsourceschange","selectend","squeeze","squeezestart","squeezeend","reflectionchange","sourceopen","sourceended","sourceclose","updatestart","update","updateend","addsourcebuffer","removesourcebuffer","show","connecting","prioritychange","mark","boundary","audiostart","soundstart","speechstart","speechend","soundend","audioend","result","nomatch"]
// 198
safari_15_3 = ["abort","blur","cancel","canplay","canplaythrough","change","click","close","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","error","focus","formdata","input","invalid","keydown","keypress","keyup","load","loadeddata","loadedmetadata","loadstart","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","pause","play","playing","progress","ratechange","reset","resize","scroll","seeked","seeking","select","slotchange","stalled","submit","suspend","timeupdate","toggle","volumechange","waiting","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend","wheel","mousewheel","animationstart","animationiteration","animationend","animationcancel","transitionrun","transitionstart","transitionend","transitioncancel","gotpointercapture","lostpointercapture","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","pointerenter","pointerleave","selectstart","selectionchange","afterprint","beforeprint","beforeunload","hashchange","languagechange","message","offline","online","pagehide","pageshow","popstate","rejectionhandled","storage","unhandledrejection","unload","versionchange","blocked","upgradeneeded","success","complete","mute","unmute","addtrack","removetrack","display","show","start","end","resume","mark","boundary","audioprocess","finish","remove","loading","loadingdone","loadingerror","readystatechange","visibilitychange","copy","cut","paste","loadend","encrypted","waitingforkey","enterpictureinpicture","leavepictureinpicture","enter","exit","checking","noupdate","downloading","updateready","cached","obsolete","open","Line","resourcetimingbufferfull","timeout","validatemerchant","paymentmethodselected","paymentauthorized","shippingmethodselected","shippingcontactselected","couponcodechanged","keystatuseschange","webkitkeyadded","webkitkeyerror","webkitkeymessage","stop","dataavailable","coordinatorstatechange","sourceopen","sourceended","sourceclose","updatestart","update","updateend","addsourcebuffer","removesourcebuffer","devicechange","tonechange","bufferedamountlow","negotiationneeded","icecandidate","signalingstatechange","iceconnectionstatechange","icegatheringstatechange","connectionstatechange","icecandidateerror","track","datachannel","merchantvalidation","shippingaddresschange","shippingoptionchange","paymentmethodchange","payerdetailchange","connecting","connect","disconnect","audiostart","soundstart","speechstart","speechend","soundend","audioend","result","nomatch","statechange","processorerror","controllerchange","messageerror","updatefound"]
// 189
firefox_97 = ["devicemotion","deviceorientation","absolutedeviceorientation","abort","blur","focus","auxclick","beforeinput","canplay","canplaythrough","change","click","close","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","formdata","input","invalid","keydown","keypress","keyup","load","loadeddata","loadedmetadata","loadend","loadstart","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","wheel","pause","play","playing","progress","ratechange","reset","resize","scroll","securitypolicyviolation","seeked","seeking","select","slotchange","stalled","submit","suspend","timeupdate","volumechange","waiting","selectstart","selectionchange","toggle","pointercancel","pointerdown","pointerup","pointermove","pointerout","pointerover","pointerenter","pointerleave","gotpointercapture","lostpointercapture","mozfullscreenchange","mozfullscreenerror","animationcancel","animationend","animationiteration","animationstart","transitioncancel","transitionend","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend","error","afterprint","beforeprint","beforeunload","hashchange","languagechange","message","messageerror","offline","online","pagehide","pageshow","popstate","rejectionhandled","storage","unhandledrejection","unload","gamepadconnected","gamepaddisconnected","copy","cut","paste","fullscreenchange","fullscreenerror","devicechange","tonechange","begin","end","repeat","voiceschanged","timeout","addtrack","removetrack","show","statechange","updatestart","update","updateend","start","stop","dataavailable","resume","encrypted","waitingforkey","complete","open","bufferedamountlow","loading","loadingdone","loadingerror","processorerror","enter","exit","mark","boundary","success","negotiationneeded","icecandidate","signalingstatechange","addstream","track","iceconnectionstatechange","icegatheringstatechange","datachannel","controllerchange","addsourcebuffer","removesourcebuffer","checking","noupdate","downloading","updateready","cached","obsolete","keystatuseschange","updatefound","mute","unmute","blocked","upgradeneeded","versionchange","finish","cancel","remove","audioprocess","readystatechange","beforescriptexecute","afterscriptexecute","pointerlockchange","pointerlockerror","visibilitychange","mozorientationchange","sourceopen","sourceended","sourceclose","bounce","resourcetimingbufferfull","Line"]
// 261
let combined = ['mouseleave', 'focus', 'loadingerror', 'reflectionchange', 'soundstart', 'bufferedamountlow', 'icecandidateerror', 'selectionchange', 'unhandledrejection', 'load', 'encrypted', 'result', 'deviceorientationabsolute', 'mousewheel', 'sourceopen', 'inactive', 'signalingstatechange', 'pointerdown', 'offline', 'transitionrun', 'updatestart', 'updateend', 'beforeunload', 'webkitanimationstart', 'datachannel', 'icegatheringstatechange', 'audiostart', 'resourcetimingbufferfull', 'animationcancel', 'connectionavailable', 'selectstart', 'nomatch', 'geometrychange', 'active', 'terminate', 'mouseout', 'mouseup', 'loadstart', 'seeking', 'loadedmetadata', 'dblclick', 'devicemotion', 'begin', 'cuechange', 'rejectionhandled', 'chargingchange', 'obsolete', 'paymentauthorized', 'mousedown', 'mozfullscreenchange', 'contextmenu', 'keypress', 'pagehide', 'closing', 'animationend', 'pointerout', 'iceconnectionstatechange', 'volumechange', 'toggle', 'exit', 'connecting', 'visibilitychange', 'wheel', 'addstream', 'activate', 'addsourcebuffer', 'mozfullscreenerror', 'beforescriptexecute', 'lostpointercapture', 'cancel', 'shippingmethodselected', 'gamepadconnected', 'popstate', 'loadingdone', 'sourceclose', 'waitingforkey', 'animationstart', 'enterpictureinpicture', 'beforeprint', 'mute', 'tonechange', 'pointerlockchange', 'merchantvalidation', 'sourceended', 'transitionend', 'beforecut', 'securitypolicyviolation', 'beforexrselect', 'soundend', 'drag', 'mouseover', 'complete', 'audioprocess', 'speechend', 'track', 'blur', 'levelchange', 'chargingtimechange', 'beforeinstallprompt', 'dragleave', 'afterprint', 'canplay', 'webkittransitionend', 'paymentmethodselected', 'playing', 'freeze', 'emptied', 'online', 'connectionstatechange', 'prioritychange', 'pointerrawupdate', 'appinstalled', 'animationiteration', 'pageshow', 'fullscreenerror', 'loadend', 'boundary', 'removesourcebuffer', 'deviceorientation', 'dataavailable', 'ended', 'loadeddata', 'message', 'languagechange', 'invalid', 'voiceschanged', 'removestream', 'repeat', 'progress', 'drop', 'payerdetailchange', 'inputreport', 'auxclick', 'disconnect', 'paymentmethodchange', 'noupdate', 'webkitfullscreenchange', 'pointerlockerror', 'pointerover', 'controllerchange', 'coordinatorstatechange', 'submit', 'dischargingtimechange', 'characteristicvaluechanged', 'blocked', 'reading', 'pointerup', 'gatheringstatechange', 'shippingcontactselected', 'timeupdate', 'checking', 'end', 'dragend', 'mousemove', 'upgradeneeded', 'reset', 'seeked', 'pointerenter', 'success', 'pointermove', 'icecandidate', 'keydown', 'play', 'display', 'timeout', 'absolutedeviceorientation', 'canplaythrough', 'shippingaddresschange', 'slotchange', 'loading', 'fullscreenchange', 'selectend', 'midimessage', 'change', 'remove', 'dragstart', 'squeezestart', 'transitionstart', 'beforepaste', 'beforeinput', 'mozorientationchange', 'gotpointercapture', 'mouseenter', 'pause', 'cut', 'webkitkeyerror', 'resume', 'speechstart', 'dragover', 'storage', 'connect', 'webkitkeymessage', 'squeeze', 'cached', 'webkitanimationend', 'Line', 'scroll', 'selectedcandidatepairchange', 'enter', 'dragenter', 'mark', 'hashchange', 'pointercancel', 'stalled', 'shippingoptionchange', 'pointerleave', 'leavepictureinpicture', 'webkitfullscreenerror', 'resize', 'addtrack', 'input', 'paste', 'release', 'devicechange', 'finish', 'stop', 'couponcodechanged', 'abort', 'error', 'statechange', 'bounce', 'formdata', 'unload', 'unmute', 'suspend', 'validatemerchant', 'managedconfigurationchange', 'processorerror', 'removetrack', 'downloading', 'readystatechange', 'webkitkeyadded', 'gamepaddisconnected', 'transitioncancel', 'search', 'keystatuseschange', 'inputsourceschange', 'show', 'audioend', 'messageerror', 'squeezeend', 'copy', 'webkitanimationiteration', 'select', 'update', 'durationchange', 'keyup', 'waiting', 'versionchange', 'gattserverdisconnected', 'beforecopy', 'open', 'updatefound', 'negotiationneeded', 'dragexit', 'ratechange', 'start', 'click', 'updateready', 'close', 'afterscriptexecute']