document-policy icon indicating copy to clipboard operation
document-policy copied to clipboard

[Feature policy: animations] What does "blocking" an animation mean?

Open birtles opened this issue 6 years ago • 2 comments

  • Do blocked animations still dispatch events?
  • Does calling Element.animate() with a disallowed property throw?
  • If an animation specifies both allowed and disallowed properties, do the allowed ones still run?

birtles avatar Aug 20 '18 00:08 birtles

Thanks for the issue. A blocked animation is expected to still run but at a very reduced sampling/interpolation rate. From the explainer

... These properties are "animated" by simply jumping from the initial to the final value at the midpoint of the animation.

so potentially the behavior could be an abrupt transition to the final state (perhaps in the middle or at the end of the interval).

Do blocked animations still dispatch events?

Yes, they should; and the behind-the-flag implementation on Chrome seems to support that as expected. In tested this on a demo page here by listening to the animationiteration event.

If an animation specifies both allowed and disallowed properties, do the allowed ones still run?

Good point...maybe just disallow the whole animation (in favor of a more consistent and potentially simpler implementation).

ehsan-karamad avatar Aug 20 '18 19:08 ehsan-karamad

... These properties are "animated" by simply jumping from the initial to the final value at the midpoint of the animation.

That sentence is in the context of describing how properties with an animation type of "discrete" currently animate. It doesn't define how "blocked" animations are expected to work with this policy.

birtles avatar Aug 21 '18 06:08 birtles