Feature: Widget design update (#426)

This commit is contained in:
Nithin David Thomas
2020-01-17 13:36:05 +05:30
committed by Pranav Raj S
parent cc180b77ce
commit f7f7a6b9c7
18 changed files with 186 additions and 66 deletions

View File

@@ -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 })}`,
'*'
);
},
};