static JSValue js_sys_url_cat(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
	const char *parent;
	const char *src;
	char *url;
	JSValue res;
	if (argc<2) return GF_JS_EXCEPTION(ctx);
	parent = JS_ToCString(ctx, argv[0]);
	src = JS_ToCString(ctx, argv[1]);
	url = gf_url_concatenate(parent, src);
	if (url) {
		res = JS_NewString(ctx, url);
		gf_free(url);
	} else {
		res = JS_NewString(ctx, src);
	}
	JS_FreeCString(ctx, parent);
	JS_FreeCString(ctx, src);
	return res;
}
static JSValue js_sys_url_cat(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
	const char *parent;
	const char *src;
	char *url;
	JSValue res;
	if (argc<2) return GF_JS_EXCEPTION(ctx);
	parent = JS_ToCString(ctx, argv[0]);
	src = JS_ToCString(ctx, argv[1]);
	url = gf_url_concatenate(parent, src);
	if (url) {
		res = JS_NewString(ctx, url);
		gf_free(url);
	} else {
		res = JS_NewString(ctx, src);
	}
	JS_FreeCString(ctx, parent);
	JS_FreeCString(ctx, src);
	return res;
}