Skip to content

Instantly share code, notes, and snippets.

@jacoduplessis
Last active September 6, 2018 12:15
Show Gist options
  • Save jacoduplessis/ed122b53f8ee473e65692812e4b9b556 to your computer and use it in GitHub Desktop.
Save jacoduplessis/ed122b53f8ee473e65692812e4b9b556 to your computer and use it in GitHub Desktop.
Load Promise and Fetch polyfills conditionally (updated 8 Jan 2016)
<script>
window.Promise || document.write('<script src="https://unpkg.com/es6-promise@4.0.5/dist/es6-promise.min.js"><\/script>');
window.fetch || document.write('<script src="https://unpkg.com/whatwg-fetch@1.1.1/fetch.js"><\/script>');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment