Message from JavaScript discussions

October 2020

— In worst case write a generator that from one, maybe json object, generate that 4 different schemas

— 

Does anyone know how I can dynamically add a script that is loaded and executed before other script tags from the static html are loaded and executed? Basically dynamically adding a blocking script.
TRGWII do you have an idea?

— Write it on your head tag?

— Scripts are executed in order of how they are loaded, unless you put async/defer on them

— I need to dynamically add the script tags but they should be loaded and executed before other script tags that are not dynamically added

Message permanent page

— The other script tags are already part of the initial html

— Then you need a script before all other scripts that controls loading of ALL scripts.

— Is there no other way?

— There is no way with html only to make sure, that the first script is done executing (especially if it involves async loading of new content) before other scripts load

Message permanent page

— No no no, no need to guess

— Cant I block loading and executing of static scripts with dynamically added scripts?

— Maybe what you want is module bundling