Skip to content

[css-animationworklet] Passing DocumentTimeline via options: "object could not be cloned." #977

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

Closed
mattgperry opened this issue Jan 29, 2020 · 1 comment

Comments

@mattgperry
Copy link

In the Spring Sticky demo, the Animation Worklet is being passed new DocumentTimeline() as an option.

The spec says animation options should be serialisable. The live demo only works because the polyfill doesn't adhere to specs. Trying to pass new DocumentTimeline() to an Animation Worklet throws the error DOMException: Failed to construct 'WorkletAnimation': DocumentTimeline object could not be cloned..

Is this something that the API should support? If not, how could the Spring Sticky possibly be implemented with the API as specced?

As an aside the technique used within the Spring Sticky where the animator can detach from the main timeline would solve issues around animations (like a spring) not being able to stop themselves.

@mattgperry
Copy link
Author

Closing as I believe #810 is tracking the above

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

1 participant