title: Executing HTML5/Javascript Within An iFrame Securely
body: <p>I'm looking to develop a website to host HTML5 games on. Since these games have the chance to include malicious javascript, I'd like to know how to setup a secure environment for hosting them.</p>
  
  <p>It seems like embedding the game with an iframe is the answer, but I'm relatively new to website development, so some questions:</p>
  
  <ul>
  <li><p>is there a simple way to host the games securely on the same domain, or...</p></li>
  <li><p>does the game have to be hosted on a different domain, then embedded within an iframe, so that it can't interact with the parent document?</p></li>
  <li><p>if the game is executed while hosted on another domain, can it interact with that host domain in any malicious way?</p></li>
  </ul>