Skip to content

Instantly share code, notes, and snippets.

@JoeyBurzynski
Last active January 31, 2023 22:12
Show Gist options
  • Save JoeyBurzynski/17c68046861d7278170412ad4502ae36 to your computer and use it in GitHub Desktop.
Save JoeyBurzynski/17c68046861d7278170412ad4502ae36 to your computer and use it in GitHub Desktop.
Shim: Non-blocking Polyfill [Promise, fetch, Object.assign, URLSearchParams]
<script>
window.Promise || document.write('<script src="https://unpkg.com/[email protected]/dist/es6-promise.min.js"><\/script>');
window.fetch || document.write('<script src="https://unpkg.com/[email protected]/fetch.js"><\/script>');
window.URLSearchParams || document.write('<script src="https://unpkg.com/@ungap/[email protected]/min.js"><\/script>');
Object.assign=Object.assign||function(r){for(var n,a=1;a<arguments.length;a++)for(var s in n=arguments[a]||{})n.hasOwnProperty(s)&&(r[s]=n[s]);return r};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment