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

[scroll] This time scroll3 is tolerable.

This commit is contained in:
Witold Filipczyk 2021-07-17 19:03:51 +02:00
parent 782b4e00f0
commit e1fbc48d9a
4 changed files with 7 additions and 4 deletions

View File

@ -90,7 +90,7 @@ kill_html_stack_item(struct html_context *html_context, struct html_element *e)
#ifdef CONFIG_ECMASCRIPT #ifdef CONFIG_ECMASCRIPT
#ifdef CONFIG_XML #if 0 //def CONFIG_XML
xmlpp::Element *elem = e->node; xmlpp::Element *elem = e->node;
if (elem) { if (elem) {
std::string onload_value = elem->get_attribute_value("onload"); std::string onload_value = elem->get_attribute_value("onload");

View File

@ -448,6 +448,7 @@ delayed_reload(void *data)
reset_document(rel->document); reset_document(rel->document);
render_xhtml_document(rel->cached, rel->document, NULL); render_xhtml_document(rel->cached, rel->document, NULL);
sort_links(rel->document); sort_links(rel->document);
draw_formatted(rel->ses, 0);
mem_free(rel); mem_free(rel);
} }
@ -471,6 +472,7 @@ check_for_rerender(struct ecmascript_interpreter *interpreter, const char* text)
if (rel) { if (rel) {
rel->cached = cached; rel->cached = cached;
rel->document = document; rel->document = document;
rel->ses = ses;
object_lock(document); object_lock(document);
register_bottom_half(delayed_reload, rel); register_bottom_half(delayed_reload, rel);
} }

View File

@ -36,6 +36,7 @@ struct delayed_open {
struct delayed_rel { struct delayed_rel {
struct cache_entry *cached; struct cache_entry *cached;
struct document *document; struct document *document;
struct session *ses;
}; };
enum remote_session_flags { enum remote_session_flags {

View File

@ -1,14 +1,14 @@
<head> <head>
<script> <script>
var tekst = 'ELinks scroll innerHTML part 3. 11.06.2021 EURO '; var tekst = ' ELinks';
function scrollText() { function scrollText() {
var znak = tekst.charAt(0); var znak = tekst.charAt(0);
tekst = tekst.substring(1, tekst.length) + znak; tekst = tekst.substring(1, tekst.length) + znak;
return tekst; return '<pre>' + tekst.substring(0, 80) + '</pre>';
} }
function scroll() { function scroll() {
document.getElementById('s').innerHTML = scrollText(); document.getElementById('s').innerHTML = scrollText();
setTimeout(scroll, 1000); setTimeout(scroll, 100);
} }
</script> </script>
</head> </head>