Issue #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.
This commit is contained in:
Moonchild 2021-01-14 17:43:44 +00:00 committed by roytam1
commit 15feed4c00
7 changed files with 16 additions and 6 deletions

View file

@ -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()
{