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();
}

上一篇:【LeetCode】150. Evaluate Reverse Polish Notation


下一篇:iOS开发--JSON