1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

[quickjs] element.appendChild and cloneNode

This commit is contained in:
Witold Filipczyk 2024-07-24 21:02:16 +02:00
parent c4fe2c04ca
commit ae82d42318

View File

@ -2459,8 +2459,10 @@ js_element_appendChild(JSContext *ctx, JSValueConst this_val, int argc, JSValueC
if (exc == DOM_NO_ERR && res) {
interpreter->changed = 1;
//dom_node_unref(el);
JSValue rr = getElement(ctx, res);
dom_node_unref(res);
return getElement(ctx, res);
return rr;
}
//dom_node_unref(el);
@ -2567,8 +2569,10 @@ js_element_cloneNode(JSContext *ctx, JSValueConst this_val, int argc, JSValueCon
return JS_NULL;
}
//dom_node_unref(el);
JSValue rr = getElement(ctx, clone);
dom_node_unref(clone);
return getElement(ctx, clone);
return rr;
}
#if 0