1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[mujs] window.self

This commit is contained in:
Witold Filipczyk 2022-08-20 18:58:50 +02:00
parent 9f33762c21
commit ff8389029c

View File

@ -254,16 +254,6 @@ js_window_clearTimeout(JSContext *ctx, JSValueConst this_val, int argc, JSValueC
return JS_UNDEFINED;
}
static JSValue
js_window_get_property_self(JSContext *ctx, JSValueConst this_val)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSValue r = JS_DupValue(ctx, this_val);
RETURN_JS(r);
}
static JSValue
js_window_get_property_top(JSContext *ctx, JSValueConst this_val)
{
@ -354,6 +344,15 @@ mjs_window_get_property_parent(js_State *J)
js_pushundefined(J);
}
static void
mjs_window_get_property_self(js_State *J)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
js_copy(J, 0);
}
static void
mjs_window_get_property_status(js_State *J)
{
@ -429,6 +428,7 @@ mjs_window_init(js_State *J)
addproperty(J, "closed", mjs_window_get_property_closed, NULL);
addproperty(J, "parent", mjs_window_get_property_parent, NULL);
addproperty(J, "self", mjs_window_get_property_self, NULL);
addproperty(J, "status", mjs_window_get_property_status, mjs_window_set_property_status);
}