Basically I want to be able to call jQuery from FireBug, place code that listens to all event fires on the page, then displays info about the event fire without knowing anything about the page structure or the types of event it has.
var s = document.createElement('script');
s.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
document.body.appendChild(s);
s.onload=function(){
// Bind a listening event without overwriting the original events
/* jQuery("*").[something](function(){
console.log ( jQuery(this) );
});*/
}
Possible solutions:
* I was thinking of going through each element and creating a event that holds as an object the original events of the element, however I was hoping there would be a much easier way.
* If there exists a method which listens to events fired from an object without overwriting the current event bind, then that would be preferable.
you could use this:
since all events use bubbling phase the document will catch them,
http://www.quirksmode.org/js/events_order.html
EDIT:
as jimbojw mentioned events that called event.stopPropagation will not be caught!
http://api.jquery.com/event.stopPropagation/