Feature: Widget design update (#426)
This commit is contained in:
committed by
Pranav Raj S
parent
cc180b77ce
commit
f7f7a6b9c7
@@ -8,3 +8,13 @@ export const arrayToHashById = array =>
|
||||
newMap[obj.id] = obj;
|
||||
return newMap;
|
||||
}, {});
|
||||
|
||||
export const IFrameHelper = {
|
||||
isIFrame: () => window.self !== window.top,
|
||||
sendMessage: msg => {
|
||||
window.parent.postMessage(
|
||||
`chatwoot-widget:${JSON.stringify({ ...msg })}`,
|
||||
'*'
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user