add more descriptive comments to polyfill comments
Some checks failed
ci / Linux (Ubuntu) (push) Has been cancelled
ci / linux-asan (push) Has been cancelled
ci / linux-msan (push) Has been cancelled
ci / linux-ubsan (push) Has been cancelled
ci / macOS (push) Has been cancelled
ci / macos-asan (push) Has been cancelled
ci / macos-ubsan (push) Has been cancelled
ci / freebsd (push) Has been cancelled
ci / qemu-alpine (arm32v6) (push) Has been cancelled
ci / qemu-alpine (arm32v7) (push) Has been cancelled
ci / qemu-alpine (arm64v8) (push) Has been cancelled
ci / qemu-alpine (i386) (push) Has been cancelled
ci / qemu-alpine (s390x) (push) Has been cancelled

This commit is contained in:
The Ghost of FOSS' Past 2024-10-25 13:04:38 -05:00
parent 7b5659c307
commit c7290cc528

4
qjs.c
View file

@ -99,7 +99,7 @@ static int eval_file(JSContext *ctx, const char *filename, int module)
else else
eval_flags = JS_EVAL_TYPE_GLOBAL; eval_flags = JS_EVAL_TYPE_GLOBAL;
//POLYFILLS BEGIN //POLYFILLS FOR QJS FILES BEGIN
const char *pf = "globalThis.global = globalThis;\n" const char *pf = "globalThis.global = globalThis;\n"
"global.console.error = console.log\n" "global.console.error = console.log\n"
"global.console.warn = console.log\n" "global.console.warn = console.log\n"
@ -547,7 +547,7 @@ int main(int argc, char **argv)
js_std_eval_binary(ctx, qjsc_repl, qjsc_repl_size, 0); js_std_eval_binary(ctx, qjsc_repl, qjsc_repl_size, 0);
} }
//POLYFILLS BEGIN //POLYFILLS FOR QJS REPL BEGIN
const char *pf = "globalThis.global = globalThis;\n" const char *pf = "globalThis.global = globalThis;\n"
"global.console.error = console.log\n" "global.console.error = console.log\n"
"global.console.warn = console.log\n" "global.console.warn = console.log\n"