[javascript] load and execute order of scripts