title: Youtube embed: Unsafe JavaScript attempt to access frame
body: <p>We have a Wicket app with a page that includes an embedded Youtube video. The video embeds and plays fine, but apparently it causes the rest of the page to not render- it seems that the DOM elements coming <em>after</em> the embed simply don't show up on the page, despite being in the markup.</p>
  
  <p>Looking at the error console in Chrome reveals:</p>
  
  <blockquote>
    <p>Unsafe JavaScript attempt to access
    frame with URL
    <a href="http://example.com/detail/COMMUNICATION/search/com-sonyericsson-hanashi" rel="nofollow noreferrer">http://example.com/detail/COMMUNICATION/search/com-sonyericsson-hanashi</a>
    from frame with URL
    <a href="http://www.youtube.com/embed/eJY7_De5opI?enablejsapi=1&amp;autohide=1&amp;showinfo=1" rel="nofollow noreferrer">http://www.youtube.com/embed/eJY7_De5opI?enablejsapi=1&amp;autohide=1&amp;showinfo=1</a>.
    Domains, protocols and ports must
    match.</p>
  </blockquote>
  
  <p>I've googled this a fair amount, and people seem to be saying that <a href="https://stackoverflow.com/questions/5806249/error-loading-youtube-video-in-modal-dialog-with-chrome/5806337#5806337">it's innocuous</a> and to ignore it. That just seems wrong, and in our case it actually breaks the page. </p>
  
  <p>If we change our app so that the video is embedded dynamically via an ajax callback (user clicks a Wicket AjaxLink) we still get the error in the console, but at least the page renders fully. Unfortunately this won't work for us, as we need the video to be loaded by default when the user first hits the page.</p>
  
  <p><strong>Edit</strong>: I should add that although the error message was taken from the Chrome console, the bug seems to affect every browser I've tried: Chrome, Safari and Firefox.</p>