1@JS() // Sets the context, which in this case is `window`
2library main; // required library declaration called main, or whatever name you wish
3
4import 'package:js/js.dart'; // Pull in our dependency
5
6@JS('parent.jsFunction') // This marks the annotated function as a call to the function
7external void jsFunction(dynamic command, dynamic arg);
8
9void callJsFunction() {
10 jsFunction('command', 'args'); // calls the function in javascript
11}
12