Stories run animate-in and amp-story-animation elements using amp-animation but the component is lazy loaded if not imported in the document head. We want the amp-optimizer to add the script tag importing it when we know it will be necessary.
Lazy loading amp-animation is what currently happens, but on throttled connections and slow devices, the lazy-loaded extension will take some time to load, delaying the animate-in animations, the amp-story-animation animations, and finish animations on prefers-reduced-motion devices.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Description
Stories run
animate-in
andamp-story-animation
elements usingamp-animation
but the component is lazy loaded if not imported in the document head. We want the amp-optimizer to add the script tag importing it when we know it will be necessary.Alternatives Considered
Lazy loading
amp-animation
is what currently happens, but on throttled connections and slow devices, the lazy-loaded extension will take some time to load, delaying theanimate-in
animations, theamp-story-animation
animations, andfinish
animations onprefers-reduced-motion
devices.