Created
May 18, 2020 03:19
-
-
Save ggicci/5840bdb09bd92daadc211966974894de to your computer and use it in GitHub Desktop.
JS create script element
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) { | |
const s = document.createElement('script') | |
s.src = src | |
document.body.appendChild(s) | |
} | |
loadScript('https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.4.456/pdf.min.js') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment