mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[js] delete old Document
Requires libxml++-5.0.2 or GIT version.
This commit is contained in:
parent
1c608ef5f5
commit
e8653c1480
@ -434,7 +434,7 @@ delayed_reload(void *data)
|
||||
assert(rel);
|
||||
doc_rerender_after_document_update(rel->ses);
|
||||
xmlpp::Document *docu = rel->doc;
|
||||
// delete docu;
|
||||
delete docu;
|
||||
mem_free(rel);
|
||||
}
|
||||
|
||||
|
@ -1636,9 +1636,9 @@ element_set_property_innerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
|
||||
xmlDoc* doc = htmlReadDoc((xmlChar*)text.c_str(), NULL, NULL, HTML_PARSE_RECOVER | HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING);
|
||||
// Encapsulate raw libxml document in a libxml++ wrapper
|
||||
xmlpp::Document *doc1 = new xmlpp::Document(doc);
|
||||
xmlpp::Document doc1(doc);
|
||||
|
||||
auto root = doc1->get_root_node();
|
||||
auto root = doc1.get_root_node();
|
||||
auto root1 = root->find("//root")[0];
|
||||
auto children2 = root1->get_children();
|
||||
auto it2 = children2.begin();
|
||||
|
Loading…
Reference in New Issue
Block a user