When does the browser execute Javascript? How does the execution cursor move?

后端 未结 2 1218
轮回少年
轮回少年 2020-11-28 02:42

I was wondering if there are any available resources that describe how a browser\'s cursor executes Javascript.

I know it loads and executes tags when a page loads,

2条回答
  •  余生分开走
    2020-11-28 03:12

    If you just stuff a block of HTML containing script tags into your DOM with "innerHTML", the script tags won't be executed at all. When you load stuff with something like jQuery, code in that library explicitly handles finding and executing the scripts.

    It's not precisely accurate, but you can basically think of the processing of a

提交回复
热议问题