Go to http://www.html5rocks.com/static/demos/evalbox/index.html
type in
console.log("foo")
and click either button. It has access to the console even from the sandbox. Is there a way to say: I want this iframe to run a script, but don't give the script access to the console?