A polyfill is a term coined by Remy Sharp for a snippet of code that adds support for a feature to browsers that don’t offer it natively.
They let you provide deeper backwards compatibility and browser support without having to use a clunky preprocessor or command line tool.
🚀 Relaunch Sale! Today through this weekend, get 30% off any vanilla JS pocket guide or bundle. They've been completely updated with new methods and modern JS approaches.
How to use a polyfill
Alternatively, you can automatically polyfill your site with a service like polyfill.io.
Some were written by me. Others were squirreled away from around the web. Links to the source and attribution are included with each one.
- Element.matches() (Back to IE8)