Skip to content

Instantly share code, notes, and snippets.

@johnteee
Forked from jacoduplessis/polyfills.html
Created September 5, 2018 05:08
Show Gist options
  • Select an option

  • Save johnteee/8eff2643902c3a1d8ee079b9fac9ce69 to your computer and use it in GitHub Desktop.

Select an option

Save johnteee/8eff2643902c3a1d8ee079b9fac9ce69 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