![]() It doesn't matter whether it's an external script or an inline script - they are executed in the order they are encountered in the page. If you aren't dynamically loading scripts or marking them as defer or async, then scripts are loaded in the order encountered in the page. Can it rely on the other having been executed (and why :-)? The second of the static, inline scripts wants to use js from the added, external script. The first one lets the script loader dynamically append another script element (referencing external js) to the body. Then I've got two static, inline scripts in the end of the body. only deals with 6 of them, and tests mostly old browsers.Īs I fear there's not, here is my specific question: I've got some (external) head scripts for initialisation and script loading. ![]() Is there a good (cross-browser) reference that covers really all cases? E.g. I'm not so concerned with fast (parallel) loading, I'm more curious about the execution order (which may depend on loading order and document order). Not counting browserscripts from the harddisk, javascript:URIs and onEvent-attributes, there are already 16 alternatives to get JS executed and I'm sure I forgot something.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |