Permalink
Browse files

clarify eval scope

  • Loading branch information...
dmp42 authored and mislav committed Dec 14, 2012
1 parent 63878c4 commit e16f3790668b7c72663bbada034f6e6c9489083b
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/ajax.js
View
@@ -202,6 +202,7 @@
result = xhr.responseText
try {
+ // http://perfectionkills.com/global-eval-what-are-the-options/
if (dataType == 'script') (1,eval)(result)
else if (dataType == 'xml') result = xhr.responseXML
else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)

0 comments on commit e16f379

Please sign in to comment.