Home > Common Problem > body text

Do all browsers now support es6?

青灯夜游
Release: 2022-10-20 14:20:20
Original
4832 people have browsed it

No; ES6 provides many new features, but not all browsers can perfectly support it. For example, IE7~11 versions basically do not support ES6, and Edge12-14 only supports some of the new ES6 features; for ES6 The most user-friendly browsers with new features are Chrome and Firefox. Chrome can support 97% of ES6 new features starting from version 51, and Firefox can support 97% of ES6 new features starting from version 53.

Do all browsers now support es6?

The operating environment of this tutorial: Windows 7 system, ECMAScript version 6, Dell G3 computer.

ES6 provides many new features, but not all browsers can fully support them. Fortunately, major browsers are now accelerating their compatibility with the new features of ES6. Among them, the most friendly browsers for the new features of ES6 are Chrome and Firefox.

Introduction to browser compatibility of ES6 syntax

##12-1415-18 ,79-87Firefox2-56-5354-86Chrome4-2021-5051-90Safari3.1-77.1-9.110-13.1, 14, TP##Opera##iOS Safari7-9.310-13.7, 14.2Opera Mini##Android Browser12-12.1Chrome for Android##83Samsung Internet45-13.0 ##10.4##7.12##

For details on each browser’s support for ES6, please check https://caniuse.com/?search=es6

If you want to know whether your browser supports ES6, please check http:// ruanyf.github.io/es-checker/index.cn.html

Desktop browser support for ES2015

  • Chrome: Starting from version 51, it can support 97% of the new features of ES6.

  • Firefox: Supports 97% of ES6 new features starting from version 53.

  • Safari: Supports 99% of ES6 new features starting from version 10.

  • IE: Edge 15 can support 96% of the new ES6 features.

  • Edge 14 can support 93% of the new ES6 features. (IE7~11 basically does not support ES6)

It can be seen that IE11 is dragging its feet again, completely giving up on ES6, and Edge will support its future.

IE11 is effectively compatible with ES6

So how do you make pure ES6 scripts run under IE11? Babel provides an effective solution.

Introduce two scripts:

https://cdn.bootcss.com/babel-core/5.8.35/browser.min.js

The The script converts statements at the es6 syntax level

https://cdn.bootcss.com/babel-core/5.8.35/browser-polyfill.min.js

This script converts the new syntax API, such as Set Map Promise, etc. methods

Mark the script blocktype = "text/babel"





    
    
    IE11 With ES6
    
    
    

Copy after login

So there are two confusions here:

First:

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!
BrowserUnsupported version Partially supported versionsSupported versions
IE6-1011
Edge
10-12.1 15-3738-72
3.2-6.1
all

2.1-4.34.4-4.4 .481##Opera Mobile
59
##87

Firefox for Android

UC Browser for Android
##12.12


QQ Browser

Baidu Browser

KaiOS Browser
2.5