阅读背景:

将eval()限制在狭窄的范围内

来源:互联网 

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 can change, but I want to know if there is some way to enforce this by preventing the eval from seeing variables in the global scope. Something like the following:I have a javascript file that reads another fil




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: