X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fes5-skip.js;h=a4039d89872d52bbede6f601b9ce8d07261fdd77;hb=55d8e0d8b70e4aebdfe0b9d21f2c4e9b64323efe;hp=d14c64bf11ae0fa12fbf983cae59599e9e835576;hpb=e798e81955a68a91bdbd0d7c727b2d1e8f597641;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; }() );