| OLD | NEW |
| 1 Methods and annotations to specify interoperability with JavaScript APIs. | 1 Methods and annotations to specify interoperability with JavaScript APIs. |
| 2 | 2 |
| 3 *Note: This package is beta software.* | 3 *Note: This package is beta software.* |
| 4 | 4 |
| 5 *Note: This packages requires Dart SDK `>=1.13.0-dev.7`.* | 5 *Note: This packages requires Dart SDK `>=1.13.0-dev.7`.* |
| 6 | 6 |
| 7 ### Adding the dependency | 7 ### Adding the dependency |
| 8 | 8 |
| 9 Add the following to your `pubspec.yaml`: | 9 Add the following to your `pubspec.yaml`: |
| 10 | 10 |
| 11 ```yaml | 11 ```yaml |
| 12 dependencies: | 12 dependencies: |
| 13 js: ^0.6.0-beta | 13 js: ^0.6.0-beta |
| 14 ``` | 14 ``` |
| 15 | 15 |
| 16 #### Passing functions to JavaScript. | 16 #### Passing functions to JavaScript. |
| 17 | 17 |
| 18 If you are passing a Dart function to a JavaScript API, you must wrap it using | 18 If you are passing a Dart function to a JavaScript API, you must wrap it using |
| 19 `allowInterop` or `allowInteropCaptureThis`. | 19 `allowInterop` or `allowInteropCaptureThis`. |
| 20 | 20 |
| 21 ### Examples | 21 ### Examples |
| 22 | 22 |
| 23 There is a [full example](https://github.com/dart-lang/sdk/tree/master/pkg/js/ex
ample) hosted with the `package:js` source code. |
| 24 |
| 23 #### Calling methods | 25 #### Calling methods |
| 24 | 26 |
| 25 ```dart | 27 ```dart |
| 26 // Calls invoke JavaScript `JSON.stringify(obj)`. | 28 // Calls invoke JavaScript `JSON.stringify(obj)`. |
| 27 @Js("JSON.stringify") | 29 @Js("JSON.stringify") |
| 28 external String stringify(obj); | 30 external String stringify(obj); |
| 29 ``` | 31 ``` |
| 30 | 32 |
| 31 #### Classes and Namespaces | 33 #### Classes and Namespaces |
| 32 | 34 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 ## Contributing and Filing Bugs | 87 ## Contributing and Filing Bugs |
| 86 | 88 |
| 87 Please file bugs and features requests on the [Github issue tracker](https://git
hub.com/dart-lang/js-interop/issues). | 89 Please file bugs and features requests on the [Github issue tracker](https://git
hub.com/dart-lang/js-interop/issues). |
| 88 | 90 |
| 89 We also love and accept community contributions, from API suggestions to pull re
quests. | 91 We also love and accept community contributions, from API suggestions to pull re
quests. |
| 90 Please file an issue before beginning work so we can discuss the design and impl
ementation. | 92 Please file an issue before beginning work so we can discuss the design and impl
ementation. |
| 91 We are trying to create issues for all current and future work, so if something
there intrigues you (or you need it!) join in on the discussion. | 93 We are trying to create issues for all current and future work, so if something
there intrigues you (or you need it!) join in on the discussion. |
| 92 | 94 |
| 93 Code contributors must sign the | 95 Code contributors must sign the |
| 94 [Google Individual Contributor License Agreement](https://developers.google.com/
open-source/cla/individual?csw=1). | 96 [Google Individual Contributor License Agreement](https://developers.google.com/
open-source/cla/individual?csw=1). |
| OLD | NEW |