<table class="text">
<tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13 支持某个API,如果不支持的话就加载对应的polyfill.然后新旧浏览器就都可以使用这个API了. "Shims can be used to support an old API in a newer environment,or a new API in an older environment. Shims can also be used for running programs on different software platforms than they were developed for."---Wikipadie 主要区别: What makes a polyfill different from the techniques we have already,like a shim,is this: if you removed the polyfill script,your code would continue to work,without any changes required in spite of the polyfill being removed.---Wikipadie (也就是说,polyfill和shim的主要区别在于,polyfill的代码如果被移除,代码仍然起作用,polyfill是否被移除都不会有任何的改变)