index.html怎么向游戏层发送消息,游戏层怎么接受的?小白,谢谢各位大神

比如,我在index.html获得的一个参数,又需要传递到ts里面,各位大佬,这个怎么实现的?谢谢了

解决了
index代码 :window.onGoogleLoginById(response.clientId);

ts代码:start() {
window[“onGoogleLoginById”] = function (data) {
console.log("===rsp==loginByGoogle===",data)
}
}