6

How can we find the very first javascript statement that gets executed in any web page.. I mean how can we find the entry point for any javascript application no matter what type of JS libraries / frameworks it uses?

user1476120
  • 79
  • 1
  • 3
  • 2
    Check the first script tag reference in html page. – Jay Jul 30 '17 at 05:16
  • Possible duplicate https://stackoverflow.com/questions/9015836/why-doesnt-javascript-need-a-main-function – MKR Jul 30 '17 at 05:18
  • @DouglasDaseeco arguably function declarations are *statements*. But I agree there are edge cases to take into account (only '[type*=javascript]', not defer|async|empty and probably some others. But the real question here is why do one need to know that ? – Kaiido Jul 30 '17 at 07:18
  • 2
    @Kaiido ... simply because I want to debug a javascript application and I want to explore the overall application architecture and function calls and I want to start from the very beginning step by step – user1476120 Jul 30 '17 at 11:21
  • Then it doesn't need to be programmatic. You can read the source code. – Kaiido Jul 30 '17 at 11:38

0 Answers0