Polyfill或ECMAScript5新功能的解决方法? [英] Polyfill or workarounds for ECMAScript5 new features?
问题描述
我想用今天可以使用的新 ECMAScript5功能编写JS代码。并在未来。
I want to write my JS code with the new ECMAScript5 features that working today and in the future.
由于并非所有浏览器都支持所有功能(尤其是IE),例如 Object.create
, Array.isArray
或 JSON
。
As not all browsers support all the features (especially IE) such as Object.create
, Array.isArray
or JSON
.
我知道一些解决方法,例如使用 json2.js
归档 JSON
支持。我想了解其他功能的更多polyfill或解决方法。
I knew a few workarounds such as use json2.js
to archieve JSON
support. I want to know more polyfills or workarounds for the other feature.
推荐答案
看看这些:
https://github.com/kriskowal/es5-shim
https ://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills (中间列出了es5垫片)
https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills ( es5 shims listed in the middle)
这篇关于Polyfill或ECMAScript5新功能的解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!