Any way to control Javascript Async Load Order?

后端 未结 2 1309
名媛妹妹
名媛妹妹 2020-12-19 00:58

How do I set the load and execution order of two external async Javascript files?

Given the following...



        
2条回答
  •  猫巷女王i
    2020-12-19 01:40

    If you need a solution for IE9 (since it does not support the defer attribute), I have created a small loader script:

    https://github.com/mudroljub/js-async-loader

    It loads all your scripts asynchronously and then executes them in order.

提交回复
热议问题