使内置控制台解析代码的行为与浏览器控制台一致,且隔离作用域
This commit is contained in:
parent
38c41f48ab
commit
40a1105eee
|
@ -45141,7 +45141,7 @@
|
||||||
else{
|
else{
|
||||||
if(!game.observe&&!game.online){
|
if(!game.observe&&!game.online){
|
||||||
try{
|
try{
|
||||||
var result=eval(text2.value);
|
var result = (new Function('_status','lib','game','ui','get','ai',`"use strict";\nreturn ${text2.value}`))(_status,lib,game,ui,get,ai);
|
||||||
game.print(result);
|
game.print(result);
|
||||||
}
|
}
|
||||||
catch(e){
|
catch(e){
|
||||||
|
|
Loading…
Reference in New Issue