B
B
bozilly2015-09-18 14:24:07
JavaScript
bozilly, 2015-09-18 14:24:07

js. How to find out in the inspector what code it has now executed?

Those. I go to the site. I click, for example, on a button and I want to know what JS does after clicking the button. How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan, 2015-09-18
@LiguidCool

You can highlight the object in the debugger and open the Event Listeners tab .

G
Green Elephant, 2015-09-18
@GreenElephantt

You open the console, put a breakpoint on the mouse movement you need and look at sources=>Event Listeners
Or
You look at the event handler in the element you need via RMB => element code=>Event Listeners
Or
set a breakpoint to change something (DOM for example) if it changes. RMB on html code
---
From experience, it's best to break changes that occurred as a result of a click, so you can see the code that called the methods from the library. Well, this is of course IMHO.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question