mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[spidermonkey] Fixes in element.remove()
This commit is contained in:
parent
6e07af8e50
commit
815c8f684b
@ -147,5 +147,13 @@ domparser_parseFromString(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
args.rval().setNull();
|
||||
return true;
|
||||
}
|
||||
return getDocument(ctx, doc);
|
||||
JSObject *obj = getDocument(ctx, doc);
|
||||
|
||||
if (!obj) {
|
||||
args.rval().setNull();
|
||||
return true;
|
||||
}
|
||||
args.rval().setObject(*obj);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -5144,10 +5144,12 @@ element_remove(JSContext *ctx, unsigned int argc, JS::Value *rval)
|
||||
if (exc != DOM_NO_ERR || !parent) {
|
||||
return true;
|
||||
}
|
||||
exc = dom_node_remove_child(parent, el, NULL);
|
||||
dom_node *res = NULL;
|
||||
exc = dom_node_remove_child(parent, el, &res);
|
||||
dom_node_unref(parent);
|
||||
|
||||
if (exc == DOM_NO_ERR) {
|
||||
dom_node_unref(res);
|
||||
interpreter->changed = 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user