Execute code in non-strict mode

It’s not sandboxed, but you can eval non-strict code like so:

(1, eval)("this")

If you want the code to be sandboxed, you’ll need to create a sandboxed iframe and run the code inside it.

3 Likes