qin
2025-03-31 8371d124f9ea5c5e898818784a2fd5e669fa7d83
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;
            }
        }
    }
}