re-impl of js eval function because wtf js

This commit is contained in:
minjaesong
2020-10-28 14:28:36 +09:00
parent 778c8bd918
commit 939940e784
2 changed files with 15 additions and 14 deletions

View File

@@ -268,10 +268,15 @@ if ('function' !== typeof Array.prototype.reduceRight) {
};
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
// NOTE TO PROGRAMMERS: this JS_INIT script does not, and must not be invoked with strict mode //
///////////////////////////////////////////////////////////////////////////////////////////////////
load = undefined
loadWithNewGlobal = undefined
load = undefined;
loadWithNewGlobal = undefined;
var eval = function(s) { // installing new eval function
return Function('"use strict";return(function(){'+s+'}())')();
}
//
function javaArrayToJs(jarr) {
if (!jarr.toString.startsWith("[")) return jarr;