0

I'm experimenting some with easyrtc using dart. Following this the file would be something like this:

import 'dart:html';
import 'package:js/js.dart' as js;

var selfEasyrtcid = "";
var easyrtc;

void main() {
  easyrtc = new js.Proxy(js.context.easyrtc);
}

void something(){
  easyrtc.someFunction();
}

but when I try to run that in dartium it crashes with:

Exception: type 'JsObject' is not a subtype of type 'JsFunction' of 'constructor'. (package:js/js.dart:168) Breaking on exception: type 'JsObject' is not a subtype of type 'JsFunction' of 'constructor'.

What am I doing wrong here?

XD face me
  • 578
  • 1
  • 3
  • 12

1 Answers1

1

According to the doc you don't need to call new JsObject that should be used to do new xxx on JS side. Simply do :

easyrtc = js.context.easyrtc;
Alexandre Ardhuin
  • 71,959
  • 15
  • 151
  • 132