mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +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
|
@ -130,4 +130,14 @@ void ShadowRoot::for_each_css_style_sheet(Function<void(CSS::CSSStyleSheet&)>&&
|
|||
}
|
||||
}
|
||||
|
||||
Vector<JS::NonnullGCPtr<Animations::Animation>> ShadowRoot::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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue