Questions tagged [shim]

A shim is code which intercepts an API method call and provides a layer of abstraction to facilitate cross-platform development

A shim is an emulation layer which is intended to allow code to be written to a specification by transparency handling deviations from it among various environments on which the code is deployed.

References

256 questions
450
votes
6 answers

What is the difference between a shim and a polyfill?

Both seem to be used in web development circles, see e.g. HTML5 Cross Browser Polyfills, which says: So here we're collecting all the shims, fallbacks, and polyfills... Or, there's the es5-shim project. In my current project we're using a number…
Domenic
  • 110,262
  • 41
  • 219
  • 271
414
votes
6 answers

What is the meaning of polyfills in HTML5?

What is the meaning of polyfills in HTML5? I saw this word in many sites about HTML5, e.g. HTML5-Cross-Browser-Polyfills. So here we're collecting all the shims, fallbacks, and polyfills in order to implant HTML5 functionality in browsers that…
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
215
votes
7 answers

What is a Shim?

What's the definition of a Shim?
Nanook
  • 3,072
  • 2
  • 19
  • 19
101
votes
3 answers

Requirejs why and when to use shim config

I read the requirejs document from here API requirejs.config({ shim: { 'backbone': { //These script dependencies should be loaded before loading //backbone.js deps: ['underscore', 'jquery'], …
Anil Gupta
  • 2,329
  • 4
  • 24
  • 30
73
votes
10 answers

Bootstrap - Uncaught TypeError: Cannot read property 'fn' of undefined

I'm using jquery, backbonejs, underscorejs and bootstrap for my company project. Sometimes I got this error in chrome. Uncaught TypeError: Cannot read property 'fn' of undefined My shim is like this in my main.js require.config({ paths: { …
Nurdin
  • 23,382
  • 43
  • 130
  • 308
31
votes
2 answers

What is the difference between the shim and facade/adapter patterns?

I'm developing an application that need to work with different incompatible versions of some library. My gut instinct was introducing an adapter between the app and the library that will have proper object of the library injected in it. Then,…
Anand Nalya
  • 741
  • 8
  • 14
31
votes
3 answers

Loading jQuery, Underscore and Backbone using RequireJS 2.0.1 and shim

I am experimenting a little bit with RequireJS 2.0.1. My goal is to load correctly jQuery, Underscore and Backbone. From the original RequireJS doc I discovered that the author J. Burke added (to this new release) a new config option called…
vrde
  • 937
  • 1
  • 11
  • 25
24
votes
1 answer

AWS beanstalk docker exception: `shim reaped`

I am currently deploying in production a application (nodejs websocket server) on AWS beanstalk, using the docker environment. Periodically, the containers 'crash' (actually the main process in the container restart), and I can't figure out…
p9f
  • 601
  • 1
  • 5
  • 14
18
votes
2 answers

How to create or use ready Shims for porting from .net framework to .net core / standard?

How to create or use ready Shims for .net framework 4.6.1 elements to port them (from .net framework 4.6.1) to .net core 2.0 / .net standard 2.0? Some classes of interest:, it would be nice to have shims for classes…
Andrey K.
  • 665
  • 8
  • 29
15
votes
6 answers

How to shim tinymce in webpack?

I'm trying to get tinymce recognized by webpack. It sets a property named tinymce on window, so evidently one option is to require() it using syntax like this (described at the bottom of the EXPORTING section of the webpack…
Rob Johansen
  • 5,076
  • 10
  • 40
  • 72
15
votes
3 answers

usable D3 replacement in IE8 (graphs with D3 and svg)

I have developed working D3 driven charts and as far as all the other browsers go, there are no problems. but recently the need to support them also in Internet Explorer 8 cropped up. But so far i can't make this html display in IE8. these are the…
kitaps
  • 243
  • 4
  • 10
15
votes
5 answers

Windows: How to create custom appcompat shims (Application Fixes)?

Windows has the capability to apply shims to mis-behaving applications. Shims are used to intercept API calls and change it. For example, shims can be used to: change the incoming paramters lie about the return values change it to call something…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
14
votes
7 answers

iframe shimming or ie6 (and below) select z-index bug

Uhm I'm not sure if anyone has encountered this problem a brief description is on IE6 any