The dart.js file is used in Dart browser apps to check for native Dart support and either (a) bootstrap Dartium or (b) load compiled JS instead. Previously, we've recommended that you add a script tag pointing the version of dart.js in our repository. This doesn't work offline and also results in slower startup (see dartbug.com/6723).
Instead, we now recommend that you install dart.js via the following steps:
Add the following to your pubspec.yaml: dependencies: browser: any
Run pub install.
Use a relative script tag in your html to the installed version:
If you do not wish to use pub, you may host a copy of this file locally instead. In this case, you will need to update it yourself as necessary. We reserve the right to move the old file in the repository, so we no longer recommend linking to it directly.
Add this to your package's pubspec.yaml file:
dependencies: browser: 0.9.0
If you're using the Dart Editor, choose:
Menu > Tools > Pub Install
Or if you want to install from the command line, run:
$ pub install
|0.9.0||Nov 06, 2013||Download browser 0.9.0 archive|
|0.8.10+4||Nov 05, 2013||Download browser 0.8.10+4 archive|
|0.8.10+3||Nov 04, 2013||Download browser 0.8.10+3 archive|
|0.8.10||Nov 01, 2013||Download browser 0.8.10 archive|
|0.8.9||Oct 31, 2013||Download browser 0.8.9 archive|
|0.8.8||Oct 30, 2013||Download browser 0.8.8 archive|
|0.8.7||Oct 28, 2013||Download browser 0.8.7 archive|
|0.8.6||Oct 24, 2013||Download browser 0.8.6 archive|
|0.8.5||Oct 21, 2013||Download browser 0.8.5 archive|
|0.8.4||Oct 19, 2013||Download browser 0.8.4 archive|