From time to time I run into situation in which I could solve a given problem by dynamicly creating piece of JavaScript, spesific to that instance of the page, that I could then insert in the final markup. Usualy this is because I want some behaviour to happen on the client side, rather than on the server side and creating a static JavaScript isn't an option.
For example, when trying to submit a files original path without submitting the file itself, when trying to do it for multiple dynamicly created components.
How would you recommend me to create a script
tag and populate it with, for example, JavaScript?