diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /resources/src/es5-skip.js | |
parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
Diffstat (limited to 'resources/src/es5-skip.js')
-rw-r--r-- | resources/src/es5-skip.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/resources/src/es5-skip.js b/resources/src/es5-skip.js new file mode 100644 index 00000000..a4039d89 --- /dev/null +++ b/resources/src/es5-skip.js @@ -0,0 +1,18 @@ +/*! + * 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 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). + * + * 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 && !!Function.prototype.bind; +}() ); |