Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset must be number? #212

Open
ycmjason opened this issue Jul 10, 2019 · 1 comment
Open

Offset must be number? #212

ycmjason opened this issue Jul 10, 2019 · 1 comment

Comments

@ycmjason
Copy link

According to the mdn doc, offset could be written in an array of numbers. Here is an example in the doc:

element.animate({
  opacity: [ 0, 0.9, 1 ],
  offset: [ 0, 0.8 ], // Shorthand for [ 0, 0.8, 1 ]
  easing: [ 'ease-in', 'ease-out' ],
}, 2000);

I was trying to do exactly the same but it throws an error:

TypeError: Keyframe offsets must be numbers.

Is this a new feature that has not been polyfilled or am I expecting wrong thing from this lib?

@birtles
Copy link

birtles commented Jul 11, 2019

Yes, arrays of offsets are a more recent addition to the spec (added just under 2 years ago) so I suspect the polyfill has not been updated to support that yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants