Skip to content

Instantly share code, notes, and snippets.

@jadjoubran
Created May 4, 2017 15:07
Show Gist options
  • Save jadjoubran/3607442a0cda8f7bcecf060687619ab0 to your computer and use it in GitHub Desktop.
Save jadjoubran/3607442a0cda8f7bcecf060687619ab0 to your computer and use it in GitHub Desktop.
Promyfill fetch demo
const fetchPolyfill = 'https://rawgit.com/github/fetch/master/fetch.js';
promyfill('fetch' in window, fetchPolyfill).then(() => {
//fetch is available (polyfill is fetched only if needed)
fetch('users.json');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment