问题
It is fairly easy to check out the data about browser support for ECMAScript2015 (ES6), but I found it pretty difficult to have an equivalently clear table for all the following ES versions (ES7 to ES10).
Mozilla has some info on their website, it is possible to see that ES7 and ES8 are fully supported, ES9 still has some problems and ES10 is supported on the latest versions.
I can also guess that IE11 never progressed after ES5.
I did not find anything for the other browsers, just some stolen info here and there.
Does anyone know what the current support level is?
回答1:
Browser vendors don't implement specific versions, but specific features. Almost every modern browser is still missing features from ES2017-ES2020. Hence there is not and won't be a table where you can see an ES version to browser version mapping.
But that is not a problem because you as a developer do the same. You use features, not versions of ECMAScript. Caniuse is still a great resource to check for support of individual features. If you are not happy with the data presentation on Caniuse, maybe these compatibility tables are better for you. Additionally, you can use polyfills and Babel for transpiling of newer features to older runtimes.
回答2:
The simple reason is: they don't support it. Everything above ES6 is still in the works. Since ES6 is still being adopted and not all browsers support everything there's no reason for them to aim for ES7. If you want to use >ES7 features I would suggest looking into Babel, since there are ways to use ES7 and above and compile it back to ES5 so that even IE supports it.
Hope that helps, feel free to comment with questions!
来源:https://stackoverflow.com/questions/61835971/es7-es8-es9-es10-browser-support