diff --git a/polyfill.io.md b/polyfill.io.md index dd5749c57a..cad27a5707 100644 --- a/polyfill.io.md +++ b/polyfill.io.md @@ -1,33 +1,37 @@ --- title: Polyfill.io category: JavaScript libraries -updated: 2018-08-20 +updated: 2024-06-26 intro: | - [Polyfill.io](https://polyfill.io) is a service that serves JavaScript polyfills. + Polyfill.io is a service that serves JavaScript polyfills. --- +> ⚠️ **CRITICAL SECURITY WARNING** +> +> The polyfill.io CDN domain is currently being used in a web supply chain attack and is serving malicious code. **Remove any references to this domain from your codebase immediately**. Use alternative CDN providers like cdnjs.cloudflare.com as shown in the examples below. + ## Usage ### Default usage ```html - + ``` + {: .-wrap} This is the default script for Polyfill.io. ### References -* [API example](https://polyfill.io/v2/docs/api) _(polyfill.io)_ -* [List of features](https://polyfill.io/v2/docs/features) _(polyfill.io)_ +* [Cloudflare now serves polyfill.io](https://blog.cloudflare.com/polyfill-io-now-available-on-cdnjs-reduce-your-supply-chain-risk) _(blog.cloudflare.com)_ ## Optimized ### For modern browsers ```html - + ``` This only includes polyfill.io when necessary, skipping it for modern browsers for faster load times. @@ -35,7 +39,7 @@ This only includes polyfill.io when necessary, skipping it for modern browsers f ### Extra features ```html - + ``` This is the same as the previous, but also adds a polyfill for `window.fetch()`. We add a `window.fetch` check and loads the additional `fetch` feature.