1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

[quickjs] Prepare for rewrite of getCollection

This commit is contained in:
Witold Filipczyk 2024-10-02 18:47:04 +02:00
parent b904e4380e
commit 9ab0c02483

View File

@ -1496,7 +1496,7 @@ js_document_getElementsByClassName(JSContext *ctx, JSValueConst this_val, int ar
return JS_NULL;
}
const char *classes = JS_ToCString(ctx, argv[0]);
struct el_dom_html_collection *col = get_elements_by_class_name(doc, (dom_node *)doc, classes);
dom_html_collection *col = (dom_html_collection *)get_elements_by_class_name(doc, (dom_node *)doc, classes);
if (classes) {
JS_FreeCString(ctx, classes);
@ -1504,7 +1504,7 @@ js_document_getElementsByClassName(JSContext *ctx, JSValueConst this_val, int ar
if (!col) {
return JS_NULL;
}
JSValue ret = getCollection2(ctx, col);
JSValue ret = getCollection(ctx, col);
RETURN_JS(ret);
}