| OLD | NEW |
| 1 This package contains dart.js, and previously contained interop.js | |
| 2 | |
| 3 dart.js | |
| 4 ======= | |
| 5 | |
| 6 The dart.js file is used in Dart browser apps to check for native Dart support | 1 The dart.js file is used in Dart browser apps to check for native Dart support |
| 7 and either (a) bootstrap Dartium or (b) load compiled JS instead. Previously, | 2 and either (a) bootstrap Dartium or (b) load compiled JS instead. Previously, |
| 8 we've recommended that you add a script tag pointing the version of dart.js in | 3 we've recommended that you add a script tag pointing the version of dart.js in |
| 9 our repository. This doesn't work offline and also results in slower startup | 4 our repository. This doesn't work offline and also results in slower startup |
| 10 (see [dartbug.com/6723](http://dartbug.com/6723)). | 5 (see [dartbug.com/6723](http://dartbug.com/6723)). |
| 11 | 6 |
| 12 Instead, we now recommend that you install dart.js via the following steps: | 7 Instead, we now recommend that you install dart.js via the following steps: |
| 13 | 8 |
| 14 1. Add the following to your pubspec.yaml: | 9 1. Add the following to your pubspec.yaml: |
| 15 dependencies: | 10 dependencies: |
| 16 browser: any | 11 browser: any |
| 17 | 12 |
| 18 2. Run pub install. | 13 2. Run pub install. |
| 19 | 14 |
| 20 3. Use a relative script tag in your html to the installed version: | 15 3. Use a relative script tag in your html to the installed version: |
| 21 | 16 |
| 22 `<script src="packages/browser/dart.js"></script>` | 17 `<script src="packages/browser/dart.js"></script>` |
| 23 | 18 |
| 24 If you do not wish to use pub, you may host a copy of this file locally instead. | 19 If you do not wish to use pub, you may host a copy of this file locally instead. |
| 25 In this case, you will need to update it yourself as necessary. We reserve the | 20 In this case, you will need to update it yourself as necessary. We reserve the |
| 26 right to move the old file in the repository, so we no longer recommend linking | 21 right to move the old file in the repository, so we no longer recommend linking |
| 27 to it directly. | 22 to it directly. |
| 28 | |
| 29 interop.js | |
| 30 ========== | |
| 31 | |
| 32 This script was required for dart:js interop to work, but it is no longer | |
| 33 needed. The functionality is now supported by dart:js directly. | |
| 34 | |
| 35 If you previously had a script such as this, please remove it: | |
| 36 | |
| 37 ```html | |
| 38 <script src="packages/browser/interop.js"></script> | |
| 39 ``` | |
| OLD | NEW |