asvd / jailed

execute untrusted code with custom permissions
MIT License
1k stars 73 forks source link

support function declaration this #41

Open jurgob opened 7 years ago

jurgob commented 7 years ago

this code :

var res = 5;
function a(){ return this.res }
a();

should return 5 instead of undefined.

this code is working fine:

res = 5;
function a(){ return this.res }
a();