John Little
John Little

Reputation: 12343

How to compile Dart to JavaScript v 1.3?

We have written a lot of horrible jscript code for server side classic ASP (the current platform of some very big blue chip companies which are our customers). jscript is more or less javascript version 1.3. It doesn't have built in JSON libs, and doesn't have some of the newer loop constructs for example

The question is, can the dart JavaScript compiler target older versions of JavaScript?

Upvotes: 2

Views: 262

Answers (1)

Alexandre Ardhuin
Alexandre Ardhuin

Reputation: 76233

No. See Q. What browsers do you plan to support as JavaScript compilation targets?.

We're currently aiming to support the following browsers:

  • Internet Explorer, latest two versions that are 9 or higher.
  • Firefox, latest two versions that are 7 or higher.
  • Chrome, latest version.
  • Safari, latest two versions that are 5.1 or higher.
  • Opera, latest version that is 12 or higher.

That's a goal; we don't actually support all of these browsers yet. The goal may change to be either more restrictive or more permissive. We'll refine this further as Dart matures.

I think the main reason is to have a browser that contains a quite recent version of javascript.

For instance, you can find some calls to Object.create (requires JavaScript 1.8.5) in the js file resulting of dart2js compilation.

Upvotes: 4

Related Questions