Rename __argv to execArgv

This commit is contained in:
Saúl Ibarra Corretgé 2024-12-02 23:25:18 +01:00
parent 858fc361ff
commit 92577d33ff

2
qjs.c
View file

@ -178,7 +178,7 @@ static JSContext *JS_NewCustomContext(JSRuntime *rt)
for(i = 0; i < qjs__argc; i++) { for(i = 0; i < qjs__argc; i++) {
JS_SetPropertyUint32(ctx, args, i, JS_NewString(ctx, qjs__argv[i])); JS_SetPropertyUint32(ctx, args, i, JS_NewString(ctx, qjs__argv[i]));
} }
JS_SetPropertyStr(ctx, global, "__argv", args); JS_SetPropertyStr(ctx, global, "execArgv", args);
JS_SetPropertyStr(ctx, global, "argv0", JS_NewString(ctx, qjs__argv[0])); JS_SetPropertyStr(ctx, global, "argv0", JS_NewString(ctx, qjs__argv[0]));
JSValue navigator_proto = JS_NewObject(ctx); JSValue navigator_proto = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, navigator_proto, navigator_proto_funcs, countof(navigator_proto_funcs)); JS_SetPropertyFunctionList(ctx, navigator_proto, navigator_proto_funcs, countof(navigator_proto_funcs));