<script>
  onload = () => {
    document.write(`
      <script>
        try {
          document.domain = document.domain;
          parent.postMessage('document-domain-is-allowed', '*');
        } catch (error) {
          parent.postMessage('document-domain-is-disallowed', '*');
        }
      </sc`+`ript>
    `);
  }
</script>
