Kangax 的 ES7 兼容性表格
https://kangax.github.io/compat-table/es2016plus/
⬤ Minor difference (1 point) ⬤ Small feature (2 points) ⬤ Medium feature (4 points) ⬤ Large feature (8 points)
Compilers/polyfills | Desktop browsers | Servers/runtimes | Mobile | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Feature name | Current browser | Traceur | Babel 6 + core-js | Closure 2018.11 | Type- Script + core-js | es7-shim | IE 11 | Edge 17 | Edge 18 | FF 60 ESR | FF 63 | FF 64 | CH 70, OP 57 | CH 71, OP 58 | SF 11.1 | SF 12 | Node >=6.5 <7[2] | Node >=8.10 <9[2] | Node >=10.13 <11[2] | DUK 2.2 | GraalVM 1.0[3] | iOS 11.3 | iOS 12 | Samsung 8.2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2016 features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§exponentiation (**) operator | 2/3 | 3/3 | 3/3 | 2/3 | 0/3 | 0/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 0/3 | 3/3 | 3/3 | 2/3 | 3/3 | 3/3 | 3/3 | 3/3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Array.prototype.includes | 0/3 | 3/3 | 2/3 | 3/3 | 2/3 | 0/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 0/3 | 3/3 | 3/3 | 3/3 | 3/3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2016 misc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§generator functions can't be used with "new" [7] | Yes | No | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§generator throw() caught by inner generator [8] | Yes | No | No | Yes | Yes[9] | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§strict fn w/ non-strict non-simple params is error[10] | Yes | No | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§nested rest destructuring, declarations [11] | Yes | No | Yes | Yes | Yes | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§nested rest destructuring, parameters[12] | Yes | No | Yes | Yes | Yes | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Proxy, "enumerate" handler removed [13] | Yes | No | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Proxy internal calls, Array.prototype.includes | Yes | No | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2017 features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Object static methods | 0/4 | 4/4 | 3/4 | 4/4 | 3/4 | 0/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 0/4 | 4/4 | 4/4 | 0/4 | 4/4 | 4/4 | 4/4 | 4/4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§String padding | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 0/2 | 2/2 | 2/2 | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§trailing commas in function syntax | 0/2 | 2/2 | 2/2 | 2/2 | 0/2 | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 0/2 | 2/2 | 2/2 | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§async functions | 3/15 | 3/15 | 9/15 | 8/15 | 0/15 | 0/15 | 15/15 | 15/15 | 15/15 | 15/15 | 15/15 | 15/15 | 15/15 | 15/15 | 15/15 | 0/15 | 15/15 | 15/15 | 0/15 | 13/15 | 15/15 | 15/15 | 15/15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§shared memory and atomics | 0/17 | 0/17 | 0/17 | 0/17 | 0/17 | 0/17 | 0/17 | 0/17 | 0/17 | 0/17 | 0/17 | 17/17 | 17/17 | 0/17 | 0/17 | 0/17 | 17/17 | 17/17 | 0/17 | 17/17 | 0/17 | 0/17 | 0/17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2017 misc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Proxy "ownKeys" handler, duplicate keys for non-extensible targets (ES 2017 semantics) [22] | Yes | No | No | No | No | No | No | Yes | Yes | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§RegExp "u" flag, case folding | Yes | No | No | No | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§arguments.caller removed | Yes | No | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2017 annex b | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Object.prototype getter/setter methods | 0/16 | 16/16 | 0/16 | 16/16 | 0/16 | 8/16 | 14/16 | 14/16 | 16/16 | 16/16 | 16/16 | 16/16 | 16/16 | 16/16 | 16/16 | 10/16 | 16/16 | 16/16 | 16/16 | 16/16 | 16/16 | 16/16 | 16/16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Proxy internal calls, getter/setter methods | 0/4 | 0/4 | 0/4 | 0/4 | 0/4 | 0/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 | 0/4 | 4/4 | 4/4 | 0/4 | 4/4 | 4/4 | 4/4 | 4/4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§assignments allowed in for-in head in non-strict mode | Yes | Yes | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2018 features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§object rest/spread properties | 0/2 | 2/2 | 1/2 | 2/2 | 0/2 | 0/2 | 0/2 | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 0/2 | 2/2 | 2/2 | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Promise.prototype.finally | 0/3 | 3/3 | 3/3 | 3/3 | 0/3 | 0/3 | 0/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 0/3 | 0/3 | 3/3 | 0/3 | 3/3 | 3/3 | 3/3 | 3/3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§s (dotAll) flag for regular expressions | Yes | ? | Yes | No | ? | No | No | No | No | No | No | No | Yes | Yes | Yes | Yes | ? | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§RegExp named capture groups | Yes | No | Yes | No | No | No | No | No | No | No | No | No | Yes | Yes | Yes | Yes | No | Flag[23] | Yes | No | Yes | Yes | Yes | Flag[23] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§RegExp Lookbehind Assertions | Yes | No | No | No | No | No | No | No | No | No | No | No | Yes | Yes | No | No | Flag[23] | Yes | Yes | No | Yes | No | No | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§RegExp Unicode Property Escapes | Yes | No | Yes | No | No | No | No | No | No | No | No | No | Yes | Yes | Yes | Yes | No | Flag[23] | Yes | No | Yes | Yes | Yes | Flag[23] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Asynchronous Iterators | 0/2 | 2/2 | 2/2 | 2/2 | 0/2 | 0/2 | 0/2 | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 | 0/2 | 2/2 | 0/2 | 0/2 | 2/2 | 0/2 | 2/2 | 0/2 | 2/2 | 2/2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2018 misc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§template literal revision | Yes | No | No | Yes | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | No | Yes | Yes | Yes | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2019 misc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§optional catch binding | 0/3 | 0/3 | 0/3 | 3/3 | 0/3 | 0/3 | 0/3 | 0/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 | 0/3 | 0/3 | 3/3 | 0/3 | 0/3 | 3/3 | 3/3 | 0/3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Symbol.prototype.description | Yes | No | No | No | No | No | No | No | No | No | Yes | Yes | Yes | Yes | No | Yes | No | No | No | No | No | No | Yes | No | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
§Function.prototype.toString revision | 0/7 | 0/7 | 0/7 | 0/7 | 0/7 | 1/7 | 4/7 | 4/7 | 7/7 | 7/7 | 7/7 | 7/7 | 7/7 | 4/7 | 4/7 | 4/7 | 4/7 | 7/7 | 1/7 | 7/7 | 4/7 | 4/7 | 4/7 |
[1] Flagged features have to be enabled via --harmony
flag
[2] Flagged features have to be enabled via --harmony
or --es_staging
flag
[3] Executed in Node.js/JVM mode via graalvm/bin/node --jvm
.
[4] The feature have to be enabled via "Experimental Javascript features" setting under about:flags
[5] This feature is supported when using Babel with core-js.
[6] This feature is supported when using TypeScript with core-js.
[7] TC39 meeting notes from July 28, 2015.
[8] 'Semantics of yield* in throw case' GitHub issue in ECMA-262 repo.
[9] Requires the downlevelIteration
compile option.
[10] TC39 meeting notes from July 29, 2015.
[11] TC39 meeting notes from July 28, 2015.
[12] TC39 meeting notes from July 28, 2015.
[14] This feature requires native generators or regenerator-runtime
, it's a part of babel-polyfill
or babel-runtime
.
[15] Flagged features have to be enabled via "Enable experimental Javascript features" setting under about:flags
[17] The feature is available only in Firefox Developer Edition and Firefox Nightly builds.
[22] The behaviour of the Proxy “ownKeys” handler in presence of duplicate keys has been modified later.
[23] The feature have to be enabled via --js-flags="--harmony"
flag
[24] The feature is considered unstable, but can be enabled via --js-flags="--harmony-promise-finally"
flag
============== End