1

Is there a way to know all the events that happened on document in JavaScript, without going through them one by one?

Instead of running through all events and doing this:

document.onDocumentContentLoaded = function(e) {
    documentLoaded = true
};

document.onmousewheel = function(e) {
    mouseWheel = true;
};

Is there a function I can call last thing in a page that gives me an array of all events that were called on a certain DOM (document in this case)?

$(window).on("beforeunload", function() {  
    //var events = document.GetAllEvents();          
});
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
HelpASisterOut
  • 3,085
  • 16
  • 45
  • 89

0 Answers0