Created
May 4, 2017 15:07
-
-
Save jadjoubran/3607442a0cda8f7bcecf060687619ab0 to your computer and use it in GitHub Desktop.
Promyfill fetch demo
This file contains 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
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