使内置控制台解析代码的行为与浏览器控制台一致,且隔离作用域

This commit is contained in:
shijian 2023-07-29 22:45:10 +08:00
parent 38c41f48ab
commit 40a1105eee
1 changed files with 1 additions and 1 deletions

View File

@ -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){