Shim:
Shim intercepts API calls and creates an abstract layer between the caller and the target. It is more like an adapter. e.g. es5-shim provides Date.now() API which adapts to old new Date().getTime() API.
Polyfill:
Polyfilling is really just a specialized version of shimming. Polyfill is about implementing missing features in an API. e.g. location.origin which is not available on IE 10.
No comments:
Post a Comment