I am dynamically adding a script of a github gist. If I added it to the html before the page loads, the script will execute. But If I try to add it to the page after it loads it adds the script to the page but doesn’t execute it. Here is how I am adding it to the page Html
Tag: script-tag
Does an external .js file require tags?
Does an external .js file require internal and containing tags to work? Answer No, they’re not needed, in fact you’ll get a syntax error if you include them. Your .js files should contain only JavaScript, no HTML tags around it, like would have inside a page.