Polyfill or workarounds for ECMAScript5 new features?

北慕城南 提交于 2019-11-30 03:02:55

问题


I want to write my JS code with the new ECMAScript5 features that working today and in the future.

As not all browsers support all the features (especially IE) such as Object.create, Array.isArray or JSON.

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.


回答1:


Take a look at these :

https://github.com/kriskowal/es5-shim

https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills ( es5 shims listed in the middle)



来源:https://stackoverflow.com/questions/8221757/polyfill-or-workarounds-for-ecmascript5-new-features

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!