In my page body, I need to insert this code as the result of an AJAX call:
Loading jQuery
const jsScript = document.createElement('script') jsScript.src = 'https://coolJavascript.js' document.body.appendChild(jsScript) jsScript.addEventListener('load', () => { doSomethingNow() })
Will load after the script is dynamically added