Assumed that I code some type of library and convert it to js (per dart2js). How can I access the prototypes to create objects? What is right way to resolve dart-namespaces?
1 Answer
You can expose functions to JavaScript
- Expose Dart functions to javascript
- Dart SDK 0.8.10.3_r29803 dart:js callbacks
- Using Dart with JSON Web Services (it's used for JSONP)
see also js library
I don't think there is a way to expose classes to JavaScript, but I'm not sure about this.
2 Comments
NaN
thx for your answer, but I am rather looking for a way to use js (dart2js output) within js projects. And your links describe possibilities to use js within dart.
Günter Zöchbauer
But each of the links contains an example how to expose a Dart function to JavaScript so that the Dart function can be called from JS. I haven't seen anything that goes more in the direction you want.