Revert " Added firing of portal-ready post message for preview"

This reverts commit 347805d4d0.
This commit is contained in:
Rishabh 2021-05-24 19:13:37 +05:30
parent edba56fbfb
commit 5650b8d716

View File

@ -57,7 +57,6 @@ export default class App extends React.Component {
if (this.state.initStatus === 'success' && prevState.initStatus !== this.state.initStatus) {
const {siteUrl} = this.props;
const contextState = this.getContextFromState();
this.sendPortalReadyEvent(siteUrl);
handleDataAttributes({
siteUrl,
site: contextState.site,
@ -74,14 +73,6 @@ export default class App extends React.Component {
});
}
sendPortalReadyEvent(siteUrl) {
const siteOrigin = ((new URL(siteUrl)).origin).replace(/\/$/, '');
if (window.self !== window.parent) {
window.parent.postMessage('portal-ready', siteOrigin);
}
}
/** Setup custom trigger buttons handling on page */
setupCustomTriggerButton() {
// Handler for custom buttons