Closed
Description
This example:
import 'dart:html';
import 'package:js/js.dart' as js;
void main() {
var context = js.context;
js.scoped(() {
var hug = new js.Proxy(context.Hug);
var result = hug.embrace(10);
query('#output').text = result;
});
}
Calling this JS file:
function Hug(strength) {
this.strength = strength;
}
Hug.prototype.embrace = function(length) {
return 'thanks, that was a good hug for ' + length + ' minutes!';
}
Hug.prototype.patBack = function(onDone) {
onDone('all done');
}
produces a 676kb .js file.
I am using Dart Editor version 0.5.16_r23799
Note: minifying the output code breaks Dart-JS interop.