I'm writing some JavaScript code to parse user-entered functions (for spreadsheet-like functionality). Having parsed the formula I could convert it into JavaScript and run eval() on it to yield the result.  However, I've always shied away f...
I have a javascript file that reads another file which may contain javascript fragments that need to be eval()-ed. The script fragments are supposed to conform to a strict subset of javascript that limits what they can do and which variables they c...
Has anyone implemented Mozilla's Object.toSource() method for Internet Explorer and other non-Gecko browsers?  I'm looking for a lightweight way to serialize simple objects into strings....
An ajax request returns me a standard JSON array filled with my user's inputs. The input has been sanitized, and using the eval() function, I can easily create my javascript object and update my page...  So here's the problem. No matter how...
I would like to have the ability to let users submit arbitrary JavaScript code, which is then sent to a Node.JS server and safely executed before the output is sent back to multiple clients (as JSON). The eval function comes to mind, but I know this...
I understand about how eval() works in non-strict contexts, however the case of using eval() in strict mode has completely befuddled me.  When eval() is called directly in the global scope, variables are kept inside the new eval() scope:  'use st...
For example:  (function() {       var proxied = window.eval;       window.eval = function() {         return proxied.apply(this, arguments);       };     })();   But this code is not working....
I am trying to execute eval within a particular context. I have found the answer here useful. However I am getting the following behavior in Chrome Version 53.0.2785.143 m. Not tried other browsers. The code I am using is the following:  function eva...
Why can a string like "{opacity: 1.0, width: '132px'}" not be evaluated using eval() as is?  eval("{opacity: 1.0, width: '132px'}");  // invalid label // {opacity: 1.0, width: '132px'} // ---------------?  eval...
This code works alerts "ok" in all browsers except Chrome:  eval("var outer = 0; function test() {'use strict'; outer = 1; } test(); alert('ok');");   (Try it on jsfiddle).  All I'm doing is referencing an outer va...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.