mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 23:30:00 -04:00
function proxy jank
This commit is contained in:
parent
39d880cbca
commit
16e0cc39c9
2 changed files with 6 additions and 7 deletions
|
@ -4,11 +4,9 @@ import { rewriteJs } from "../../shared";
|
|||
function rewriteFunction(ctx: ProxyCtx, client: ScramjetClient) {
|
||||
const stringifiedFunction = ctx.call().toString();
|
||||
|
||||
const content = rewriteJs(
|
||||
`return ${stringifiedFunction}`,
|
||||
false,
|
||||
client.meta
|
||||
);
|
||||
const content =
|
||||
"return " + rewriteJs(`return ${stringifiedFunction}`, false, client.meta);
|
||||
console.log(content);
|
||||
ctx.return(ctx.fn(content)());
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,9 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
|
|||
{},
|
||||
{
|
||||
set(t, p, v) {
|
||||
console.log(p, v);
|
||||
try {
|
||||
self[p] = v;
|
||||
} catch {}
|
||||
return true;
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue