Is there a known workaround for IE9's execution order of injected script tags?

后端 未结 4 1961
無奈伤痛
無奈伤痛 2021-01-14 06:18

I am sure I don\'t fully understand this problem, but it seems that we are seeing strange behavior on IE9 on my project, somehow related to out-of-order execution o

4条回答
  •  盖世英雄少女心
    2021-01-14 06:43

    So the advantage of writing script tags this way is that they are loaded asynchronously. I don't know about browser nuances about exactly how this is done but I would have thought they would be executed when they're downloaded, in no specific order. Similar to the behaviour of the HTML5 async attribute.

    There's another HTML5 attribute defer which instead makes scripts execute in order, but in a non blocking way. You could try adding that into your generated

提交回复
热议问题