typescript里面调用javasript
index.html 里面加入函数:
function tellYou() {
egret.log("tell you.");
javascript:android.funA();
}
对应的ts文件:
declare function tellYou();
private onSocketOpen():void{
this.connectTimes = 0;
egret.log("connect success.");
tellYou();
}
posted on 2017-08-24 09:48 maomingchao 阅读(616) 评论(0) 编辑 收藏 举报