title: How to use iFrameResizer on multiple domains?
body: <p>i'm using <a href="https://github.com/davidjbradshaw/iframe-resizer" rel="nofollow noreferrer">Iframe Resizer</a> and my code is not working cross domain. It works fine when the two domain are the same. Can you help? It's weird because the iframe definitely has the iFrameResizer.contentWindow.js loaded AND i use the checkOrigin: false so it should allow the cross domain...</p>
  
  <p>Here are the errors I get in the console when loading the parent page that has the iframe:</p>
  
  <p><code>Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://jacobjohnson.net') does not match the recipient window's origin ('http://designtesting.cfs.local').</code></p>
  
  <p><code>iframeResizer.min.js:8 [iFrameSizer][Host page: display_frame] No response from iFrame. Check iFrameResizer.contentWindow.js has been loaded in iFrame</code></p>
  
  <pre><code>&lt;div class="panel panel-default" id="iframePanel"&gt;
      &lt;div class="panel-body" style="padding:0px;"&gt;
         &lt;iframe id="display_frame" name="display_frame" class="frame" src="http://jacobjohnson.net/iframetest.html" allowfullscreen&gt;&lt;/iframe&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;script&gt;
  
      jQuery('#display_frame').iFrameResize( [{log:true, checkOrigin: false}] );
  
      var frameHeight =  3905; // $('#display_frame').height();
      var newHeight = frameHeight / 2;
      $('#iframePanel').height(newHeight);
  
      $(window).resize( function() {
          var frameHeight = $('#display_frame').height();
          var newHeight = frameHeight / 2;
          $('#iframePanel').height(newHeight);
      });
  
  &lt;/script&gt;
  </code></pre>