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