Have Dart app fallback on JS automaticly.

80 views
Skip to first unread message

Chris London

unread,
Jul 28, 2014, 10:32:17 AM7/28/14
to mi...@dartlang.org
Hi all, I am kinda new to web-dev. More used to Java and C# than anything. I was wondering if there was a way to have my dart web app run in a non-dart supported browser by automatically translating it to JS? If so what's the best way to do this?

Günter Zöchbauer

unread,
Jul 28, 2014, 10:39:54 AM7/28/14
to mi...@dartlang.org
Currently there are only non-dart browsers ;-)
Dartium is for development only (not for production use).
Dart support for Chrome is work in progress though.

Currently you run `pub build` in your application package and it generates JavaScript that runs in the last two versions of the evergreen browsers.

Chris London

unread,
Jul 30, 2014, 9:19:16 AM7/30/14
to mi...@dartlang.org
I see, I take it I include the generated JS script instead of my dart one then? Thanks.

Günter Zöchbauer

unread,
Jul 30, 2014, 11:59:26 AM7/30/14
to mi...@dartlang.org
Exactly. There is a dart2dart available that produces Dart deployables but that is experimental and as far as I know will be in experimental state until the first browser supports Dart natively (probably Chrome ;-) )

Chris London

unread,
Jul 30, 2014, 2:48:27 PM7/30/14
to mi...@dartlang.org
I see, Thanks. Hopefuly Dart will be supported by many mainstream browsers in the future to simplify all this :)
Reply all
Reply to author
Forward
0 new messages