For years we've limited the JavaScript produced by our deployment-focused JavaScript compiler — dart2js — to ECMAScript 5 (ES5). Using ES5 has allowed us to continue supporting Internet Explorer 11, but it has kept us from migrating to the latest JavaScript features.
We plan to remove the ES5 restriction this year, allowing dart2js to use JavaScript features supported by the last two major releases of Chrome, Firefox, Safari, and Edge. These new features have the potential to make generated JavaScript smaller and faster.
Timeline
2019 Q1
Introduce a flag to opt into ES6+ generation. ES5 will remain the default.
2019 Q2
Change the ES6+ flag to be opt-out. To generate ES5-compatible Javascript, you’ll need to provide a flag.
2019 Q3
Drop ES5 support entirely and remove the ES6+ flag.
Supporting IE11 in 2019 and beyond
If you need to continue supporting legacy browsers, you have two options: