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

[quickjs] Prevent from trigger DOMContentLoaded many times

This commit is contained in:
Witold Filipczyk 2024-07-07 14:25:50 +02:00
parent f5cb5f3ba3
commit daf8b5e397

View File

@ -2074,6 +2074,10 @@ document_event_handler(dom_event *event, void *pw)
}
if (!strcmp("DOMContentLoaded", dom_string_data(typ))) {
if (doc_private->state == COMPLETE) {
dom_string_unref(typ);
return;
}
doc_private->state = COMPLETE;
}
// interpreter->heartbeat = add_heartbeat(interpreter);