1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-27 01:25:34 +00:00

[quickjs] document.defaultView

This commit is contained in:
Witold Filipczyk 2024-01-17 17:05:36 +01:00
parent 5297063bbe
commit ebb41e9c67

View File

@ -285,6 +285,18 @@ js_document_get_property_childNodes(JSContext *ctx, JSValueConst this_val)
return getNodeList(ctx, nodes);
}
static JSValue
js_document_get_property_defaultView(JSContext *ctx, JSValueConst this_val)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
REF_JS(this_val);
JSValue global_obj = JS_GetGlobalObject(ctx);
RETURN_JS(global_obj);
}
static JSValue
js_document_get_property_doctype(JSContext *ctx, JSValueConst this_val)
{
@ -1549,6 +1561,7 @@ static const JSCFunctionListEntry js_document_proto_funcs[] = {
JS_CGETSET_DEF("charset", js_document_get_property_charset, NULL),
JS_CGETSET_DEF("characterSet", js_document_get_property_charset, NULL),
JS_CGETSET_DEF("childNodes", js_document_get_property_childNodes, NULL),
JS_CGETSET_DEF("defaultView", js_document_get_property_defaultView, NULL),
JS_CGETSET_DEF("doctype", js_document_get_property_doctype, NULL),
JS_CGETSET_DEF("documentElement", js_document_get_property_documentElement, NULL),
JS_CGETSET_DEF("documentURI", js_document_get_property_documentURI, NULL),