fix(animation): fallback to CSS Animations on older versions of Chrome (#19288)

fixes #19272
This commit is contained in:
Liam DeBeasi
2019-09-10 11:32:40 -04:00
committed by GitHub
parent 4e544f1d90
commit 2d39c07fec

View File

@ -42,7 +42,8 @@ export const createAnimation = () => {
const _afterAddReadFunctions: any[] = [];
const _afterAddWriteFunctions: any[] = [];
const webAnimations: any[] = [];
const supportsWebAnimations = (typeof (Element as any) === 'function') && (typeof (Element as any).prototype!.animate === 'function');
const supportsAnimationEffect = (typeof (AnimationEffect as any) === 'function' || typeof (window as any).AnimationEffect === 'function');
const supportsWebAnimations = (typeof (Element as any) === 'function') && (typeof (Element as any).prototype!.animate === 'function') && supportsAnimationEffect;
const ANIMATION_END_FALLBACK_PADDING_MS = 100;
/**