Created
March 6, 2020 08:28
-
-
Save jacknie84/a29de4a0862c15051aba1c40b2d7236c to your computer and use it in GitHub Desktop.
cdn inject for es5
This file contains hidden or 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 injectCdnScript(cdnUrl) { | |
var script = document.createElement('script') | |
script.src = cdnUrl | |
script.onload = function(e) { | |
console.log('loaded cdn ' + cdnUrl) | |
} | |
var head = document.getElementsByTagName('head')[0] | |
head.appendChild(script) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cdn url list