wujingjing
2025-03-31 b46350a1b3b927aad42094a7a3a8ab00ec1740bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
const notifyFunc = (jsonObj: any) => {
    console.log('message from parent🚀 ~ jsonObj:', jsonObj);
    // 执行AI通知消息
};
export class ChildRegister {
    static childCallObj = null;
    static registerNotifyFunction() {
        for (let index = 0; index < window.frames.length; index++) {
            const frame = window.frames[index];
            if ((frame as any).registerNotifyFunction) {
                ChildRegister.childCallObj = (frame as any).registerNotifyFunction(notifyFunc);
                break;
            }
        }
    }
}