mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[doc] get_root element in fire_onload
It did not help, but it did not break either.
This commit is contained in:
parent
ab97277031
commit
a6d5623c2a
@ -645,7 +645,20 @@ fire_generic_dom_event(void *t, void *tar, int bubbles, int cancelable)
|
||||
int
|
||||
fire_onload(void *doc)
|
||||
{
|
||||
return fire_generic_dom_event(corestring_dom_DOMContentLoaded, doc, false, false);
|
||||
dom_node *root = NULL;
|
||||
|
||||
if (!doc) {
|
||||
return false;
|
||||
}
|
||||
dom_exception exc = dom_document_get_document_element(doc, &root);
|
||||
|
||||
if (exc != DOM_NO_ERR || !root) {
|
||||
return false;
|
||||
}
|
||||
int res = fire_generic_dom_event(corestring_dom_DOMContentLoaded, root, false, false);
|
||||
dom_node_unref(root);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user