View all open events in html node - Javascript

I still consider myself a newbie with javascript ... so be careful :)

Is there a way to view all open event listeners on a page and possibly see any inifinte loops running?

What happens is the page I'm trying to debug works fine. Nodes are added to the page dynamically using the drag and drop method. Everything works well, but over time it becomes slower - this means that the mouse begins to skip one as well.

I don’t know if this is due to the fact that javascript stores the material in memory, and my memory is used up, or due to constant checking of elements on mousemove it slows down as more elements are added to the page.

So, I thought that I would ask that, in my opinion, explicit, maybe eventListeners accumulate, and I don’t understand, or maybe there is an inifinte loop that does not close.

I have a firebug and I feel like looking at everything. I put the instructions in console.debug in loops, and they all seem to be fine.

Any debugging tips would be appreciated.

+3
source share
2 answers

I would say that definitely be careful with memory leaks, especially in IE. Here is a good resource for learning Javascript: www.javascriptkit.com

, : http://www.javascriptkit.com/jsref/events.shtml http://www.javascriptkit.com/javatutors/closuresleak/index.shtml

+2

JavaScript. Google chrome ctrl-shift-j > . firebug firefox.

0

Source: https://habr.com/ru/post/1764218/


All Articles