let sall document window concat document querySelectorAll for skey in

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
let sall = [document, window].concat([...document.querySelectorAll('*')])
for (skey in sall) {
var found = false;
let evs = getEventListeners(sall[skey]);
for (elkey in evs) {
if (elkey.includes("key")) {
let them = evs[elkey]
found = true;
for (thkey in them) {
console.log(">'" + elkey + "': " + JSON.stringify(them[thkey]))
console.log(them[thkey].listener)
}
}
}
if (found) {
console.log("'" + skey + "': " + sall[skey] )
console.log("--------")
}
}