        parent.postMessage({ action: 'error', value: error }, '*')
          } catch (e) {
            parent.postMessage({ action: 'error', value: msg }, '*')
          }
        }

        window.addEventListener('unhandledrejection', (event) => {
          if (
            event.reason.message &&
            event.reason.message.includes('Cross-origin')
          ) {
            event.preventDefault()
            return
          }
          try {
            parent.postMessage(
              { action: '