web-animations/web-animations-js

Feature Detection For browsers with partial support

lannonbr opened this issue · 3 comments

It is fairly easy to dynamically load in the polyfill if a browser doesn't support the Web Animations API at all by the following:

if(!('animate' in document.body)) {
  // load in polyfill
}

Although, the current stable version of safari doesn't fully support the AnimationEffectTimingProperties even under the expirimental support under a flag. What is a suggestion to detect if the browser doesn't have full support of the Web Animations API to load in only if needed.

any idea on this one?

I don't think Safari ever shipped to release a version that didn't support AnimaitonEffectTimingProperties (without flipping a flag) so I don't think feature detection for this particular subset is necessary?

I'm running into this this also (setting Animation.currentTime doesn't work on Safari as documented at https://developer.mozilla.org/en-US/docs/Web/API/Animation/currentTime) and would like a way to force Safari to use this library's animation implementation.