Is JavaScript multithreaded?

前端 未结 9 1994
误落风尘
误落风尘 2020-11-27 04:23

Here\'s my issue - I need to dynamically download several scripts using jQuery.getScript() and execute certain JavaScript code after all the scripts were loaded, so my plan

9条回答
  •  春和景丽
    2020-11-27 05:20

    No, JavaScript is not multi-threaded. It is event driven and your assumption of the events firing sequentially (assuming they load sequentially) is what you will see. Your current implementation appears correct. I believe jQuery's .getScript() injects a new

提交回复
热议问题