X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=resources%2Fsrc%2Fes5-skip.js;h=a4039d89872d52bbede6f601b9ce8d07261fdd77;hb=e09cc5413f81181a1fd8366c23baf148505489fe;hp=d14c64bf11ae0fa12fbf983cae59599e9e835576;hpb=9e98c1911ec72662daf23ffb55c25fc9fd515912;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/es5-skip.js b/resources/src/es5-skip.js index d14c64bf11..a4039d8987 100644 --- a/resources/src/es5-skip.js +++ b/resources/src/es5-skip.js @@ -2,14 +2,17 @@ * Skip function for es5-shim module. * * Test for strict mode as a proxy for full ES5 function support (but not syntax) - * Per http://kangax.github.io/compat-table/es5/ this is a reasonable short-cut - * that still allows this to be as short as possible (there are no function "No"s - * for non-"obsolete" real browsers where strict support is available). + * Per http://kangax.github.io/compat-table/es5/ this is a reasonable shortcut + * that still allows this to be as short as possible (there are no browsers we + * support that have strict mode, but lack other features). * - * Note that this will cause IE9 users to get the shim (which should be close to - * a no-op but will increase page payload). + * Do explicitly test for Function#bind because of PhantomJS (which implements + * strict mode, but lacks Function#bind). + * + * IE9 supports all features except strict mode, so loading es5-shim should be close to + * a no-op but does increase page payload). */ return ( function () { 'use strict'; - return !this; + return !this && !!Function.prototype.bind; }() );