ie6 is not compatible with es6. IE6 does not support recognizing ES6 syntax and will report an error. Solution: 1. Introduce the babel-browser.min.js file so that you can use ES2015 for encoding; 2. Introduce the browser-polyfill.js file to solve the problem of incompatibility between arrow functions or promises or async and awite; 3. Add the "type="text/babel"" attribute to the script tag.
The operating environment of this tutorial: Windows 7 system, ECMAScript version 6, Dell G3 computer.
IE6 does not support ES6 syntax, so when using IE, the ES6 syntax is not recognized and an error is reported.
Browser versions that support ES6 (summary table)
Browser | Unsupported versions | Partially supported versions | Supported versions |
---|---|---|---|
IE | 6-10 | 11 | |
##Edge | 15-18, 79-87 | ||
2-5 | 6-53 | 54 -86 | |
4-20 | 21-50 | 51-90 | |
3.1-7 | 7.1-9.1 | 10-13.1, 14, TP | |
10-12.1 | 15-37 | 38-72 | |
3.2-6.1 | 7-9.310-13.7, 14.2 | ##Opera Mini | |
all | ##Android Browser |
||
4.4-4.4.4 | 81##Opera Mobile | ||
59 | Chrome for Android |
||
# #87 | Firefox for Android |
||
##83 | |||
Samsung Internet |
4 | ||
QQ Browser |
|||
Baidu Browser |
7.12 | ||
KaiOS Browser |
2.5 |
||
Solution for IE not supporting ES6 |
Solution
1.Introduce babel-browser.min.js To solve this we must first introduce babel-browser.min.js , so that you can use ES2015 for coding 2.Introduce browser-polyfill.jsSolve the problem of arrow function or promise or async, awite incompatibility
3.After introduction Add type="text/babel" to your js file. After adding it, you will find that ES6 syntax can be supported at this time.javascript video tutorial
,web front-end
】The above is the detailed content of Is ie6 compatible with es6?. For more information, please follow other related articles on the PHP Chinese website!