Proxying a site to be able to WYSIWYG edit in iframe - How does it work?
<p><strong>CONTEXT</strong></p>

<p>I'm looking to create a WYSIWYG editor that allows users to edit a third party site loaded within an iframe. I know the companies such as Optimizely use proxying to accomplish this (<a href="https://stackoverflow.com/questions/5224756/how-does-optimizely-visual-website-optimizer-handle-visual-dom-editing">as described here</a>) but I don't quite understand how this works. In particular, this part is somewhat unclear:</p>

<blockquote>
  <p>The Optimizely Editor loads <a href="http://www.mypage.com" rel="nofollow noreferrer">http://www.mypage.com</a> inside an iframe and uses window.postMessage to communicate with the page. This only works if that page already has a snippet like the one above on it. If that's not the case, the editor will timeout while waiting for a message from the iframe'd page, and will load it again via a proxy that actually inserts the snippet onto the page. </p>
</blockquote>

<p><strong>QUESTION</strong></p>

<p>What exactly does proxying do that allows a JS snippet to be inserted into the page and for the user to edit otherwise uneditable content loaded in iframe?</p>