Index: pkg/js/README.md |
diff --git a/pkg/js/README.md b/pkg/js/README.md |
index e28092384b4fb89bd61abf9ec474993b06c3314a..19162f8e3dc58b9a599f7ed030cdc612a2484958 100644 |
--- a/pkg/js/README.md |
+++ b/pkg/js/README.md |
@@ -57,16 +57,21 @@ class Location { |
} |
``` |
-#### Maps |
- |
-Dart `Map` objects, including literals, are "opaque" in JavaScript. |
-You must create Dart classes for each of these. |
+#### JavaScript object literals |
+Many JavaScript APIs take an object literal as an argument. For example: |
```js |
// JavaScript |
printOptions({responsive: true}); |
``` |
+If you want to use `printOptions` from Dart, you cannot simply pass a Dart `Map` |
+object – they are are "opaque" in JavaScript. |
+ |
+ |
+Instead, create a Dart class with both the `@JS()` and |
+`@anonymous` annotations. |
+ |
```dart |
// Dart |
void main() { |
@@ -77,6 +82,7 @@ void main() { |
external printOptions(Options options); |
@Js() |
+@anonymous |
class Options { |
external bool get responsive; |
@@ -86,7 +92,7 @@ class Options { |
## Contributing and Filing Bugs |
-Please file bugs and features requests on the [Github issue tracker](https://github.com/dart-lang/js-interop/issues). |
+Please file bugs and features requests on the [Github issue tracker](https://github.com/dart-lang/sdk/issues). |
We also love and accept community contributions, from API suggestions to pull requests. |
Please file an issue before beginning work so we can discuss the design and implementation. |