title: "eval is not a function" when using iframe and Greasemonkey/Scriptish
body: <p>Is there any way I can get this piece of code to work inside Greasemonkey/Scriptish, or would I have to inject it into the webpage itself?</p>
  
  <pre><code>body = document.getElementsByTagName("body")[0];
  fakeConsole = 'window.top._console';
  injected = document.getElementById("sandbox") ? true : false;
  sandboxframe = injected ? document.getElementsById("sandbox") : document.createElement('iframe');
  sandbox = null;
  
  if (!injected) {
     body.appendChild(sandboxframe);
     sandboxframe.setAttribute('id', 'sandbox');
     sandboxframe.setAttribute('style', "display:none")
  }
  
  var p = sandboxframe.contentWindow.eval('1 + 1');
  console.log(p);
  </code></pre>
  
  <p>This code does work when using source:</p>
  
  <pre><code> &lt;script type="text/javascript" src="test.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>But not when using in a Greasemonkey script, I have observed there's some kind of security barrier I'm not quite familiar with and attempted to use unsafeWindow to bypass XPCNativeWrapper.</p>
  
  <p>Please shed some light on this.</p>