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();
}
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();
}
转载于:https://www.cnblogs.com/maomingchao/p/7421500.html