Const script
script: "// wrap onmessage setup in function so that variables created (id, calls, etc.)// aren't in worker script scope.onmessage = function () {const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;let id = 0;const calls = {};const system = new Proxy({}, {get: function (obj, sysCallName) {// Make a system call "prop"return (...args) => {return new Promise((resolve, reject) => {id ++;calls[id] = resolve;postMessage([id, sysCallName].concat(args));});}}});function initialize(e) {let func = new AsyncFunction('system', e.data);func.bind(this)(system).then(() => {return system.exit("");}).catch((error) => {system.error(error.toString());console.log(error);});messageHandler = handleCallReturn;}function handleCallReturn(e) {let id = e.data[0];let data = e.data[1];let sysCall = calls[id];if (sysCall){delete calls[id];sysCall(data);}}let messageHandler = initialize;return messageHandler;}();" = `// wrap onmessage setup in function so that variables created (id, calls, etc.)// aren't in worker script scope.onmessage = function () {const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;let id = 0;const calls = {};const system = new Proxy({}, {get: function (obj, sysCallName) {// Make a system call "prop"return (...args) => {return new Promise((resolve, reject) => {id ++;calls[id] = resolve;postMessage([id, sysCallName].concat(args));});}}});function initialize(e) {let func = new AsyncFunction('system', e.data);func.bind(this)(system).then(() => {return system.exit("");}).catch((error) => {system.error(error.toString());console.log(error);});messageHandler = handleCallReturn;}function handleCallReturn(e) {let id = e.data[0];let data = e.data[1];let sysCall = calls[id];if (sysCall){delete calls[id];sysCall(data);}}let messageHandler = initialize;return messageHandler;}();`