JavaScript から Dart 関数を呼び出したいと思います。
dart2js(バージョン 1.1.3)を使用して Dart 関数を含む Dart スクリプトをコンパイルし、生成さ.jsれたファイルを Javascript 環境にロードして、Javascript からその関数を呼び出したいと思います。
myHyperSuperMegaFunction以下のJavascriptからの呼び出しに沿ったもの。
import 'dart:js' as js;
int myHyperSuperMegaFunction(int a, int b) {
  return a + b;
}
main() {
  js.context['myHyperSuperMegaFunction'] = new js.JsFunction.withThis(myHyperSuperMegaFunction);
}
上記をコンパイルしてdart2js、生成された.jsファイルをChromeに読み込んでみました。変数myHyperSuperMegaFunctionは次のように登録および定義されます
function () {
    return _call(f, captureThis, this, Array.prototype.slice.apply(arguments));
}
ただし、myHyperSuperMegaFunction(2,3)Chrome Javascript コンソールから呼び出すと、次のエラーが表示されますNoSuchMethodError : method not found: 'Symbol("call")' Receiver: Instance of '(){this.$initialize' Arguments: [Instance of 'Window', 2, 3]