[英]Head.js multiple cals of head.load
Does multiple calls of head.load syncronised? 是否多次同步调用head.load?
I mean if we have code like this: 我的意思是,如果我们有这样的代码:
head.load('scr1.js',...,'scr8.js');
head.load('scr11.js',...,'scr18.js');
..................
head.load('scr81.js',...,'scr88.js');
Will all this js files loaded asynchronously and executed in order they are in source (ie scr1,scr2,scr3,....scr8,scr11,scr12...)? 是否将所有这些js文件异步加载并按其在源中的顺序执行(即scr1,scr2,scr3,.... scr8,scr11,scr12 ...)?
head.load('scr1.js',...,'scr8.js');
will load files asyn, but execute in order. 将加载文件asyn,但按顺序执行。 And similarly
head.load('scr11.js',...,'scr18.js');
同样是
head.load('scr11.js',...,'scr18.js');
. 。 But, its not sure that what block will execute first ie
head.load('scr1.js',...,'scr8.js');
但是,不确定哪个块将首先执行,即
head.load('scr1.js',...,'scr8.js');
or head.load('scr11.js',...,'scr18.js');
或
head.load('scr11.js',...,'scr18.js');
. 。 If you require to execute in order than load your
head.load('scr11.js',...,'scr18.js');
如果您需要按顺序执行而不是加载
head.load('scr11.js',...,'scr18.js');
in the callback of head.load('scr1.js',...,'scr8.js');
在
head.load('scr1.js',...,'scr8.js');
的回调中head.load('scr1.js',...,'scr8.js');
head.load('scr1.js',...,'scr8.js', function (){
head.load('scr11.js',...,'scr18.js');
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.