Web: Common: Added frameCallback util

This commit is contained in:
Ilya Oleshko 2022-08-01 14:47:04 +03:00
parent 14e6d3ffbb
commit c53028ac3f

View File

@ -391,3 +391,13 @@ export function assign(obj, keyPath, value) {
}
obj[keyPath[lastKeyIndex]] = value;
}
export const frameCallback = (data) => {
window.parent.postMessage(
JSON.stringify({
type: "onMethodReturn",
methodReturnData: data,
}),
"*"
);
};