mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
423 B
17 lines
423 B
/*===
|
|
type=6
|
|
ToString=[object global]
|
|
duk_is_function(global.escape)=1
|
|
===*/
|
|
|
|
void test(duk_context *ctx) {
|
|
duk_push_global_object(ctx);
|
|
printf("type=%d\n", (int) duk_get_type(ctx, -1));
|
|
printf("ToString=%s\n", duk_to_string(ctx, -1));
|
|
duk_pop(ctx);
|
|
|
|
duk_push_global_object(ctx);
|
|
duk_get_prop_string(ctx, -1, "escape");
|
|
printf("duk_is_function(global.escape)=%d\n", (int) duk_is_function(ctx, -1));
|
|
duk_pop(ctx);
|
|
}
|
|
|