Created
May 5, 2021 09:49
-
-
Save joshghent/f502c3d6d0786de3b8d3834bb7de4787 to your computer and use it in GitHub Desktop.
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 loadScript(src, done) { | |
var js = document.createElement('script'); | |
js.src = src; | |
js.onload = function() { | |
done(); | |
}; | |
js.onerror = function() { | |
done(new Error('Failed to load script ' + src)); | |
}; | |
document.head.appendChild(js); | |
} | |
loadScript("./src/polyfill-io.js, () => {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment