最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What does un-shimmable mean? - Stack Overflow

programmeradmin4浏览0评论

I read through the vuejs2 documentation and found this part:

This is an ES5-only and un-shimmable feature, which is why Vue doesn’t support IE8 and below.

I think it means that the feature is not possible to be monkey patched, but I'm not sure.

So what is a (un-)shimmable feature in JavaScript exactly all about?

I read through the vuejs2 documentation and found this part:

This is an ES5-only and un-shimmable feature, which is why Vue doesn’t support IE8 and below.

I think it means that the feature is not possible to be monkey patched, but I'm not sure.

So what is a (un-)shimmable feature in JavaScript exactly all about?

Share Improve this question edited Jul 15, 2022 at 19:54 tony19 138k23 gold badges276 silver badges346 bronze badges asked Aug 27, 2017 at 6:42 itsafireitsafire 6,0933 gold badges39 silver badges50 bronze badges 2
  • 4 Yes, that's a fair summary: making the feature work requires more than an added/updated "monkey patched" method. An un-shimmable feature is one that requires a core "engine" change due to some intrinsic property or operation that did not occur in a previous EMCAScript version. For example, ES6 generators are "un-shimmable". (There are ES6 to ES5 transpilers; shims generally must work with 'the source as it is'.) – user2864740 Commented Aug 27, 2017 at 6:43
  • That's a great answer. Go for it. – itsafire Commented Aug 27, 2017 at 6:47
Add a comment  | 

1 Answer 1

Reset to default 24

You got it right, a shim is a patch that provides otherwise unavailable functionality or a language feature.

Some features, however, require support from the underlying JS engine, and cannot be created purely in Javascript. I imagine that's what they meant.

发布评论

评论列表(0)

  1. 暂无评论