aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/animations.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/animations.rs')
-rw-r--r--components/script/animations.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/animations.rs b/components/script/animations.rs
index 693c3ae978f..6119de7c1dd 100644
--- a/components/script/animations.rs
+++ b/components/script/animations.rs
@@ -76,6 +76,10 @@ impl Animations {
self.pending_events.borrow_mut().clear();
}
+ pub(crate) fn animations_present(&self) -> bool {
+ self.has_running_animations.get() || !self.pending_events.borrow().is_empty()
+ }
+
// Mark all animations dirty, if they haven't been marked dirty since the
// specified `current_timeline_value`. Returns true if animations were marked
// dirty or false otherwise.