I want to get notified about all the events happening in a webpage.
For each single event I am using something like this:
if(document.addEventListener){
document.addEventListener('click', function(e) { something(e) } , true);
}else{
if(document.attachEvent){
document.attachEvent('onclick', function(e) { something(e) });
}
}
Is there a simple cross-browser way to get notified about all the events in a webpage instead of listening to each event separately(without using jQuery)?