Line 576 of jQuery 1.7rc1 is:
return (new Function( "return " + data ))();
Now jshint complains with the warning
The Function constructor is eval.
What does this error mean? Why did the jQuery people write this line the way it is?
Line 576 of jQuery 1.7rc1 is:
return (new Function( "return " + data ))();
Now jshint complains with the warning
The Function constructor is eval.
What does this error mean? Why did the jQuery people write this line the way it is?
Since eval is evil and the Function constructor uses eval to create the new Function, jshint doesn't like it. JQuery is using it to parse JSON for older browsers that don't natively support JSON.parse().