javascript - Create a dynamic function without eval() or Function constructor -


i have function body in string. say,

str "return a+b"

for function takes 2 arguments a , b. how create anonymous (or named) function string? trying make application content security policy compliant , therefore using eval , function constructor not option. apparently, can done using prototypes maybe. ideas?


Comments

Popular posts from this blog

PHP while loop dynamic rowspan -

timer - Java TimerTask cancel -

android - How to read a column value in parse.com without accessing an object or a pointer -