Content deleted Content added
Citation bot (talk | contribs) Misc citation tidying. | Use this bot. Report bugs. | Suggested by BrownHairedGirl | #UCB_webform 1950/3745 |
Clarify the usage of "support." |
||
Line 2:
{{short description|Code to implement features in web browsers that do not support them}}
In [[web development]], a '''polyfill''' is code that implements a feature on [[web browser]]s that do not natively support the feature. Most often, it refers to a [[JavaScript]] [[Library (computing)|library]] that implements an [[HTML5]] or [[CSS]] [[web standard]], either an established standard (supported by some browsers) on older browsers, or a proposed standard (not supported by any browsers) on existing browsers. Formally, "a polyfill is a [[Shim (computing)|shim]] for a browser [[Application programming interface|API]]".<ref name="speakingjs">{{cite book|title=Speaking JavaScript |url=http://speakingjs.com/ |author=Luis Ángel Pérez Castillo |year=2019}}</ref>
Polyfills allow web developers to use an API regardless of whether or not it is supported by a browser, and usually with minimal overhead. Typically they first check if a browser supports an API, and use it if available, otherwise using their own implementation.<ref name="speakingjs"/><ref>"It typically checks if a browser supports an API. If it doesn’t, the polyfill installs its own implementation. That allows you to use the API in either case."</ref> Polyfills themselves use other, more supported features, and thus different polyfills may be needed for different browsers. The term is also used as a verb: ''polyfilling'' is providing a polyfill for a feature.
|