How to run javascript inside browser safely and securely? <p>I need to <code>eval()</code> the code inside my page because I am working on something jsFiddle-like. Since <code>eval</code> has such a bad reputation, how can I interpret the user input code safely and securely? Or as safely and securely as possible?</p>