1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[quickjs] element.clientLeft and element.clientTop

This commit is contained in:
Witold Filipczyk 2024-01-26 21:24:13 +01:00
parent 81c692e6b8
commit a72db310b4

View File

@ -328,6 +328,24 @@ js_element_get_property_className(JSContext *ctx, JSValueConst this_val)
RETURN_JS(r);
}
static JSValue
js_element_get_property_clientLeft(JSContext *ctx, JSValueConst this_val)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
return JS_NewInt32(ctx, 0);
}
static JSValue
js_element_get_property_clientTop(JSContext *ctx, JSValueConst this_val)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
return JS_NewInt32(ctx, 0);
}
static JSValue
js_element_get_property_dir(JSContext *ctx, JSValueConst this_val)
{
@ -2819,6 +2837,8 @@ static const JSCFunctionListEntry js_element_proto_funcs[] = {
JS_CGETSET_DEF("childElementCount", js_element_get_property_childElementCount, NULL),
JS_CGETSET_DEF("childNodes", js_element_get_property_childNodes, NULL),
JS_CGETSET_DEF("className", js_element_get_property_className, js_element_set_property_className),
JS_CGETSET_DEF("clientLeft", js_element_get_property_clientLeft, NULL),
JS_CGETSET_DEF("clientTop", js_element_get_property_clientTop, NULL),
JS_CGETSET_DEF("dir", js_element_get_property_dir, js_element_set_property_dir),
JS_CGETSET_DEF("firstChild", js_element_get_property_firstChild, NULL),
JS_CGETSET_DEF("firstElementChild", js_element_get_property_firstElementChild, NULL),