
I ofen see polyfill words in documents. I wonder know what it points?
I quote wikipedia:
In web development, a polyfill is code that implements a feature on web browsers that do not support the feature. Most often, it refers to a Javascript library that implements an HTML5 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 for a browser API".
As a result, polyfill is a tools supporting a no-built in feature.
It is not just belong to web browsers,more than web development.
1 hjdtl 2017-12-07 10:34:38 +08:00 百度了一下,感觉这个答案还不错: https://segmentfault.com/a/1190000002593432 |
2 SourceMan 2017-12-07 10:36:58 +08:00 Google 了一下,感觉这个答案还不错: https://stackoverflow.com/questions/7087331/what-is-the-meaning-of-polyfills-in-html5 |
3 kamal 2017-12-07 11:04:02 +08:00 |
4 serco 2017-12-07 11:13:06 +08:00 英文不忍直视啊。。。 |
5 robinlovemaggie 2017-12-07 11:26:39 +08:00 简单点说兼容新老浏览器的库就是 polyfill,否则不是。例如,jQuery 不是,Polymer, FlashCavas 是。 |
6 Mutoo 2017-12-07 11:53:44 +08:00 If you want to use an edge or modern feature on a widespread old browser (e.g. es2015 Promises), you can use the polyfill (e.g. Promises-polyfill), if the new feature is not internal provided but can be implemented within the current Javascript's scope. |
8 shanechiu OP @hjdtl I read the article throughly, it is fully. Thank you for your recommendation. |