mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Add DocumentOrShadowRoot::get_animations()
This commit is contained in:
parent
37322baf54
commit
5b84bd6e45
Notes:
sideshowbarker
2024-07-17 07:48:42 +09:00
Author: https://github.com/mattco98
Commit: 5b84bd6e45
Pull-request: https://github.com/SerenityOS/serenity/pull/24530
5 changed files with 27 additions and 0 deletions
|
@ -4406,6 +4406,16 @@ void Document::ensure_animation_timer()
|
|||
m_animation_driver_timer->start();
|
||||
}
|
||||
|
||||
Vector<JS::NonnullGCPtr<Animations::Animation>> Document::get_animations()
|
||||
{
|
||||
Vector<JS::NonnullGCPtr<Animations::Animation>> relevant_animations;
|
||||
for_each_child_of_type<Element>([&](auto& child) {
|
||||
relevant_animations.extend(child.get_animations({ .subtree = true }));
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
return relevant_animations;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dom.html#dom-document-nameditem-filter
|
||||
static bool is_potentially_named_element(DOM::Element const& element)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue