Modified exec to pass in the iframe window as the first argument to the function to execute in the sandbox.

By passing the iframe window as the first argument, this helps in
understanding how to write the function to execute, as it gives an
explicit reference to window, instead of needing to use 'this'.