diff --git a/JetStreamDriver.js b/JetStreamDriver.js index d3a4d9ca..6b4c6668 100644 --- a/JetStreamDriver.js +++ b/JetStreamDriver.js @@ -312,56 +312,6 @@ class Driver { } } - runCode(string) { - if (!isInBrowser) { - const scripts = string; - let globalObject; - let realm; - if (isD8) { - realm = Realm.createAllowCrossRealmAccess(); - globalObject = Realm.global(realm); - globalObject.loadString = function(s) { - return Realm.eval(realm, s); - }; - globalObject.readFile = read; - } else if (isSpiderMonkey) { - globalObject = newGlobal(); - globalObject.loadString = globalObject.evaluate; - globalObject.readFile = globalObject.readRelativeToScript; - } else - globalObject = runString(""); - - globalObject.console = { - log: globalObject.print, - warn: (e) => { print("Warn: " + e); }, - error: (e) => { print("Error: " + e); }, - debug: (e) => { print("Debug: " + e); }, - }; - - globalObject.self = globalObject; - globalObject.top = { - currentResolve, - currentReject - }; - - globalObject.performance ??= performance; - for (const script of scripts) - globalObject.loadString(script); - - return isD8 ? realm : globalObject; - } - - const magic = document.getElementById("magic"); - magic.contentDocument.body.textContent = ""; - magic.contentDocument.body.innerHTML = "