1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[ecmascript] reset_document before rewrite

This commit is contained in:
Witold Filipczyk 2024-06-22 12:29:07 +02:00
parent b521083839
commit 86234795fb
4 changed files with 6 additions and 4 deletions

View File

@ -266,6 +266,9 @@ delayed_reload(void *data)
assert(rel);
object_unlock(rel->document);
reset_document(rel->document);
rel->document->links_sorted = 0;
dump_xhtml(rel->cached, rel->document, 1 + rel->was_write);
sort_links(rel->document);
draw_formatted(ses, 2);

View File

@ -4619,7 +4619,6 @@ element_getElementsByTagName(JSContext *ctx, unsigned int argc, JS::Value *vp)
args.rval().setNull();
return true;
}
exc = dom_element_get_elements_by_tag_name(el, tagname, &nlist);
dom_string_unref(tagname);

View File

@ -585,8 +585,9 @@ draw_formatted(struct session *ses, int rerender)
if (rerender) {
rerender--; /* Mind this when analyzing @rerender. */
if (!(rerender & 2) && session_is_loading(ses))
if (!(rerender & 2) && session_is_loading(ses)) {
rerender |= 2;
}
render_document_frames(ses, rerender);
/* Rerendering kills the document refreshing so restart it. */

View File

@ -11,8 +11,7 @@
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onload = function() {
document.getElementById("demo").innerHTML =
xhttp.responseText;
document.getElementById("demo").innerHTML = xhttp.responseText;
}
xhttp.open("GET", "ajax_info.txt");
xhttp.send();