Web polyfill

An automatic CDN service for Web polyfills, which is based on TypeScript, Node.js & JSDelivr.


Usage example

  1. Find a Web feature in the Polyfill directory
  2. Copy the class name of the selected polyfill, then write it into a specific Script URL (shown below)
  3. the above script will detect whether current environment needs to be patched, then load the polyfill script original from JSDelivr

Web pages

    <script src="https://polyfill.web-cell.dev/feature/ResizeObserver.js"></script>

Web workers


Add more polyfills

  1. For junior engineers, you can submit an issue and wait for the maintainer reaction
  2. For senior engineers, just edit the Polyfill directory, and make a pull request
  3. After your pull request reviewd & merged, the polyfills will be updated by GitHub actions automatically

Host your own mirror

  1. Fork this repository
  2. Replace original HTTP domain with yours in GitHub action configuration
  3. You can replace GitHub pages with an Object Storage service (AWS S3, etc.)

China mainland

Thanks for KaiYuanShe's donation, we get a fast local mirror for China mainland:


Custom examples

Edit .env content to fit your situation:




Inspired by

  1. https://polyfill.io/
  2. https://polyfill.dev/

All supported polyfills

No. Name Package Source Map Network
1 ECMAScript6 es6-shim βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
2 Proxy es6-proxy-polyfill πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
3 ECMAScript7 es7-shim βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
4 ECMAScript core-js-bundle βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
5 Regenerator regenerator-runtime βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
6 GetCanonicalLocales @formatjs/intl-getcanonicallocales πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
7 Locale @formatjs/intl-locale πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
8 PluralRules @formatjs/intl-pluralrules πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
9 DisplayNames @formatjs/intl-displaynames πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
10 ListFormat @formatjs/intl-listformat πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
11 NumberFormat @formatjs/intl-numberformat πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
12 DateTimeFormat @formatjs/intl-datetimeformat πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
13 RelativeTimeFormat @formatjs/intl-relativetimeformat πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
14 ResizeObserver resize-observer-polyfill βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
15 IntersectionObserver intersection-observer πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
16 ScrollBehavior scroll-behavior-polyfill βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
17 WebAnimation web-animations-js βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
18 EventSubmitter event-submitter-polyfill βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
19 Dialog dialog-polyfill πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
20 WebComponents @webcomponents/webcomponentsjs βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
21 ElementInternals element-internals-polyfill βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
22 AdoptedStyleSheets construct-style-sheets-polyfill βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
23 PointerEvents @wessberg/pointer-events βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
24 TextEncoder fastestsmallesttextencoderdecoder-encodeinto βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
25 URL url-polyfill πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
26 Fetch whatwg-fetch βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
27 EventTarget event-target-polyfill βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
28 AbortController yet-another-abortcontroller-polyfill βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
29 Clipboard clipboard-polyfill βœ… πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
30 PWAManifest pwacompat πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³
31 Share share-api-polyfill πŸ‡ΊπŸ‡³ πŸ‡¨πŸ‡³