mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
LibWeb: Let NavigableContainers delay the document load event
This commit is contained in:
parent
72376ad15a
commit
2805e16c1c
2 changed files with 12 additions and 1 deletions
|
@ -2389,7 +2389,12 @@ bool Document::anything_is_delaying_the_load_event() const
|
||||||
if (m_number_of_things_delaying_the_load_event > 0)
|
if (m_number_of_things_delaying_the_load_event > 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// FIXME: Track down all the things that are supposed to delay the load event.
|
for (auto& navigable : descendant_navigables()) {
|
||||||
|
if (navigable->container()->currently_delays_the_load_event())
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME: Track down anything else that is supposed to delay the load event.
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2595,6 +2600,11 @@ Vector<JS::Handle<HTML::Navigable>> Document::descendant_navigables()
|
||||||
return navigables;
|
return navigables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector<JS::Handle<HTML::Navigable>> const Document::descendant_navigables() const
|
||||||
|
{
|
||||||
|
return const_cast<Document&>(*this).descendant_navigables();
|
||||||
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/document-sequences.html#inclusive-descendant-navigables
|
// https://html.spec.whatwg.org/multipage/document-sequences.html#inclusive-descendant-navigables
|
||||||
Vector<JS::Handle<HTML::Navigable>> Document::inclusive_descendant_navigables()
|
Vector<JS::Handle<HTML::Navigable>> Document::inclusive_descendant_navigables()
|
||||||
{
|
{
|
||||||
|
|
|
@ -473,6 +473,7 @@ public:
|
||||||
Vector<JS::Handle<HTML::BrowsingContext>> list_of_descendant_browsing_contexts() const;
|
Vector<JS::Handle<HTML::BrowsingContext>> list_of_descendant_browsing_contexts() const;
|
||||||
|
|
||||||
Vector<JS::Handle<HTML::Navigable>> descendant_navigables();
|
Vector<JS::Handle<HTML::Navigable>> descendant_navigables();
|
||||||
|
Vector<JS::Handle<HTML::Navigable>> const descendant_navigables() const;
|
||||||
Vector<JS::Handle<HTML::Navigable>> inclusive_descendant_navigables();
|
Vector<JS::Handle<HTML::Navigable>> inclusive_descendant_navigables();
|
||||||
Vector<JS::Handle<HTML::Navigable>> ancestor_navigables();
|
Vector<JS::Handle<HTML::Navigable>> ancestor_navigables();
|
||||||
Vector<JS::Handle<HTML::Navigable>> inclusive_ancestor_navigables();
|
Vector<JS::Handle<HTML::Navigable>> inclusive_ancestor_navigables();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue