summaryrefslogtreecommitdiff
path: root/dom/base/nsDocument.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-01-14 17:43:44 +0000
committerMoonchild <moonchild@palemoon.org>2021-01-14 17:43:44 +0000
commit8849ecd5ff3a61e13542aa4d1030ef76fad59da5 (patch)
treeb44936cf95aea75ecb8de43d17f46967929f7bfd /dom/base/nsDocument.cpp
parentcab0d50211714e254e81bcb2ea4d695ab093fd86 (diff)
downloadaura-central-8849ecd5ff3a61e13542aa4d1030ef76fad59da5.tar.gz
Issue mcp-graveyard/UXP%1689 - Part 4: Add a preference for {Document,Element}.getAnimations()
This is probably the last thing we will ship (if ever) since it needs the most spec and implementation work for arbitrary use that is pretty far into a corner.
Diffstat (limited to 'dom/base/nsDocument.cpp')
-rw-r--r--dom/base/nsDocument.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp
index 43f11c031..1c3e7a421 100644
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -2941,6 +2941,15 @@ nsDocument::AreWebAnimationsImplicitKeyframesEnabled(JSContext* /*unused*/, JSOb
Preferences::GetBool("dom.animations-api.implicit-keyframes.enabled");
}
+bool
+nsDocument::IsWebAnimationsGetAnimationsEnabled(JSContext* /*unused*/, JSObject* /*unused*/)
+{
+ MOZ_ASSERT(NS_IsMainThread());
+
+ return nsContentUtils::IsCallerChrome() ||
+ Preferences::GetBool("dom.animations-api.getAnimations.enabled");
+}
+
DocumentTimeline*
nsDocument::Timeline()
{