Last active
August 23, 2021 05:33
-
-
Save akshar-dave/e3cf2fda0e1f9927c2e9a70685cdf88c to your computer and use it in GitHub Desktop.
Load a script in js
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 loadScript(src){ | |
var script = document.createElement('script'); | |
script.src = src; | |
script.async = false; | |
document.body.appendChild(script); | |
return script; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment