title: What's the lowest footprint way to isolate JavaScript code
body: <p>I'm developing a HTML5 platform that involves potentially untrusted third-party developers to be able to write plugins for it (in JavaScript). What's the best way to isolate those plugins?</p>
  
  <p>I'm currently using sandboxed offscreen iframes, but the memory footprint is pretty huge. Are there other lower-footprint ways to isolate JavaScript code?</p>
  
  <p>In particular I'm looking for protection from:</p>
  
  <ul>
  <li>Two untrusted plugins should not be able to read each others' data.</li>
  <li>Plugins should not be able to read arbitrary sensitive data or cookies from the main platform and only be able to interact with the main platform via a provided API.</li>
  <li>Plugins should not be able to lock up the UI of the main platform.</li>
  </ul>
  
  <p>iframes are great, but is it really necessary to launch a full-blown WebKit browser-in-a-browser to accomplish the above?</p>