Last active
April 6, 2017 19:47
-
-
Save theswedishdev/ed2b4605a0163bcc02bd71277a0bd8ac to your computer and use it in GitHub Desktop.
Based on http://stackoverflow.com/a/5235385
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadJS(file) { | |
let jsElement = document.createElement("script"); | |
jsElement.type = "application/javascript"; | |
jsElement.src = file; | |
document.body.appendChild(jsElement); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment