I want my users to be able to use JavaScript as a scripting language inside my JavaScript application. In order to do so, I need to dynamically execute the source code. There seem to be two main options for dynamically executing JavaScript: a) Use eval(…) method ( or var func = new Function(…);) . b) Add a <script> node to