javascript - Listen to all events in Chrome browser -


i want listen events happen in site. use monitorevents() command, command prints event console, , want set callback function manipulations on data without printing console.

is there smart way this?

you can try this:

var eventslist = ["mousedown", "mouseup", "click", "dblclick", "mousemove",     "mouseover", "mouseout", "mousewheel", "keydown", "keyup", "keypress",      "textinput", "touchstart", "touchmove", "touchend", "touchcancel", "resize",     "scroll", "zoom", "focus", "blur", "select", "change", "submit", "reset"];  var callbackfunction = function(element, eventname) {   console.log('triggered event ' + eventname); };  var elements = document.queryselectorall('*'); (var = 0; < elements.length; i++) {   (var j = 0; j < eventslist.length; j++) {     var element = elements[i];     var event = eventslist[j];      element.addeventlistener(event,         callbackfunction.bind(this, element, event), true);   } } 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -