fix(animation): better feature detection (#19212)

fixes #19205
This commit is contained in:
Liam DeBeasi
2019-08-28 13:20:54 -04:00
committed by GitHub
parent 93f2064927
commit 6eca5b0d7f
8 changed files with 13 additions and 10 deletions

View File

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