What is Polyfill?
JavaScript code that implements a missing browser API so newer features work in older environments.
Definition
A polyfill supplies a runtime implementation of a platform feature the host environment lacks—patching Promise, fetch, or Array.prototype.at onto older browsers so application code can use one API everywhere. The term, coined by Remy Sharp, distinguishes runtime patching from transpilation, which rewrites syntax at build time; the two are complementary (Babel transforms syntax, core-js polyfills APIs). Services like polyfill-delivery via feature detection ship only what each browser needs. As legacy browser support has waned, teams increasingly drop broad polyfill bundles, but targeted polyfills remain essential for cutting-edge APIs during their rollout across engines.

