-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failuresweb-dart2js
Milestone
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.
Metadata
Metadata
Assignees
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failuresweb-dart2js