How to provide ECMAScript 5 (ES 5)-shim?

后端 未结 3 1088
有刺的猬
有刺的猬 2021-02-02 07:09

ECMAScript Fifth Edition (released December 2009) introduces a bunch of new methods (see this table for details). However, there still are older browsers out there which do not

3条回答
  •  情书的邮戳
    2021-02-02 07:49

    ES5-Shim will only shim parts that the browsers don't implement, so just give it to all browsers. It'll handle the detection of what needs to be shimmed and what doesn't.

    But pay attention to the caveats listed on what shims don't work correctly in some instances. I've had issues with that in the past and it causes a ton of pain until you realize the answer was super simple...

提交回复
热议问题