==Definition==
The term is a [[neologism]], coined by Remy Sharp, who required a word that meant "replicate an API using JavaScript (or Flash or whatever) if the browser doesn’t have it natively" while co-writing the book ''Introducing HTML5'' in 2009.<ref name="introducing276">{{cite book |title=Introducing HTML5 |author1=Bruce Lawson |author2=Remy Sharp |section=Introducing Polyfills |pages=[https://books.google.com/books?id=a8HQCk4pbQkC&pg=PA276 276–277]}}</ref><ref name="sharp2010">{{cite web |last=Sharp |first=Remy |title=What is a polyfill? |url=httphttps://remysharp.com/2010/10/08/what-is-a-polyfill/ |access-date=13 January 2012}}</ref> Formally, "a shim is a [[Library (computing)|library]] that brings a new API to an older environment, using only the means of that environment."<ref name="speakingjs"/> Polyfills exactly fit this definition; the term ''shim'' was also used for early polyfills.<ref>{{cite web |quote=This piece of information makes building an HTML5 compatibility shim for IE7 far easier than had previously been assumed.|title=Mistakes, Sadness, Regret |url=httphttps://ln.hixie.ch/?start=1201080691&count=1 |author-link=Ian Hickson |author=Ian Hickson |date=2008-01-23}}</ref> However, to Sharp ''shim'' connoted non-transparent APIs and workarounds, such as [[spacer GIF]]s for layout, sometimes known as <code>shim.gif</code>, and similar terms such as ''[[progressive enhancement]]'' and ''[[graceful degradation]]'' were not appropriate, so he invented a new term.<ref name="sharp2010"/> The term is based on the [[spackling paste|multipurpose filling paste]] brand ''[[Spackling paste#Polyfilla|Polyfilla]],'' a paste used to cover up cracks and holes in walls, and the meaning "fill in holes (in functionality) in many ([[wikt:poly-|poly-]]) ways." The word has since gained popularity, particularly due to its use by [[Paul Irish]] and in [[Modernizr]] documentation.<ref name="sharp2010"/><ref>{{cite web |url=https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills |title=HTML5 Cross browser Polyfills |website=[[GitHub]] |archive-url=https://web.archive.org/web/20100928233437/http://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills |archive-date=2010-09-28}}</ref>
The distinction that Sharp makes is:<ref name="introducing276"/>
=== core-js ===
core-js<ref>{{Cite web|url=https://github.com/zloirock/core-js|title = Core-js|website = [[GitHub]]|date = 26 October 2021}}</ref> is the most popular<ref>{{Cite web|url=https://www.npmtrends.com/core-js-vs-core-js-pure-vs-es5-shim-vs-es6-shim-vs-airbnb-js-shims-vs-polyfill-library-vs-polyfill-service-vs-js-polyfills|title = Airbnb-js-shims vs core-js vs core-js-pure vs es5-shim vs es6-shim vs js-polyfills vs polyfill-library vs polyfill-service | NPM trends}}</ref> and powerful<ref>{{cite web | url=httphttps://kangax.github.io/compat-table/es6/#babel7corejs3 | title=ECMAScript 6 compatibility table }}</ref> JavaScript [[standard library]] polyfill. Includes polyfills for [[ECMAScript]] up to the latest version of the standard: promises, symbols, collections, iterators, typed arrays, many other features, ECMAScript proposals, some cross-platform [[WHATWG]] / [[W3C]] features and proposals like <code>URL</code>. You can load only required features or use it without global namespace pollution. It can be integrated with [[Babel (compiler)|Babel]], which allows it to automatically inject required core-js modules into your code.
=== HTML5 Shiv ===
== External links ==
* {{cite web |url= https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills |title= List of polyfills providing HTML5 facilities |___location= GitHub |publisher= [[Modernizr]] project }}
* {{cite web |url= httphttps://html5please.com/ |title= HTML5 Polyfill List by Feature |editor1-first= Divya |editor1-last= Manian |editor2-first= Paul |editor2-last= Irish |editor-link2= Paul Irish |editor3-first= Tim |editor3-last= Branyen |editor4-first= Connor |editor4-last= Montgomery |editor5-first= Arthur |editor5-last= Verschaeve |display-editors=etal |website= HTML5 Please |quote= The recommendations... represent the collective knowledge of developers who have been deep in the HTML5 trenches }}
* {{cite web |url= httphttps://www.moreonfew.com/what-are-polyfills-in-javascript/ |title= What are PolyFills in Javascript? |date= Sep 5, 2013 |website= More on Few }}
[[Category:Compatibility layers]]
|