I have a web application that uses jsonp which return javascript codes to a client.
This is the code I'm returning (to make it unreadable):
com.xx.load('xx','var name="hguser";function data(x){console.info(x); }')
in the load function, we are eval codes.
However, we found that it is not readable, but it is not being debugged.
So I wonder if we can use this:
com.xx.load('xx',function(){ var name='hguser'; function data(x){ console.info(x); } });
Then in the load function inside the line of the eval line of code, now we will be the eval object of the function.
Is it possible?
Does this mean the same thing?
source share