wujingjing
2025-03-31 a22a715caae95546e40358a5327487f5f46fe749
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
const notifyFunc = (type, jsonArgs) => {
    console.log('message from parent🚀 ~ type:', type);
    // 执行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;
            }
        }
    }
}