Skip to content

breaking change: dropping support for EcmaScript5 #46545

Description

@sigmundch

Two years ago we announced a plan to deprecate support for ES5. Changes in priorities made us delay our plans until now.

In an upcoming Dart release (likely 2.14), dart2js will start generating code using ES6 features by default.

What can break?
Apps will stop running in old browsers like IE11 that don't support these ES6 features.

Modern browsers will not be affected, dart2js continues to support the last two major releases of Edge, Safari, Firefox, and Chrome.

Mitigation
Users that continue needing support on legacy browsers have two options:

  • Translate the output from dart2js using a tool like BabelJs.
  • Delay migrating to Dart releases that lack ES5 support until they find a viable a migration path. The caveat here is that we only provide bug fixes to the most recent SDK version.

For a short period we will also provide a --legacy-javascript flag that removes the modern ES6 features. The intend of this flag is to make it easy to opt-out in case bugs are discovered after the default changes, but this flag will not be kept around long term and will likely be removed one or two stable releases after this first breaking change.

@Markzipan @franklinyow @vsmenon @mit-mit @kevmoo

@grouma @Hixie - for approvals

Metadata

Metadata

Assignees

Labels

area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.breaking-change-requestThis tracks requests for feedback on breaking changesweb-dart2js

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions