Last active
December 24, 2015 14:09
-
-
Save mkalygin/6810002 to your computer and use it in GitHub Desktop.
Add Script to DOM
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 addScript(path) { | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.src = path; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment